Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

347 #9

Merged
merged 2,104 commits into from
Nov 28, 2020
Merged
Changes from 1 commit
Commits
Show all changes
2104 commits
Select commit Hold shift + click to select a range
844e262
Change copy icon and add extra padding to highlight block
wendigo Nov 4, 2020
3ef8d24
Extract simple bit operations to methods
Oct 26, 2020
08c18a1
Generify 128-bit multiplication
Oct 26, 2020
9701d23
Simplify and speed-up 128-bit multiplication
Oct 26, 2020
a8093a7
Fix incorrect comment in Kafka.InternalField
brandboat Oct 30, 2020
55c2698
Rename Kerberos to HadoopKerberos
kokosing Nov 9, 2020
7e8c266
Move tempto configuration files to environment directories
kokosing Nov 9, 2020
490ccfe
Inline compose method
kokosing Nov 9, 2020
9f225cb
Bind presto-product-tests-launcher beans in SINGLETON scope
kokosing Nov 9, 2020
9c383ca
Allow EnvironmentExtender to define its dependencies
kokosing Nov 9, 2020
fb29ab5
Express Kerberos dependency explicitly
kokosing Nov 9, 2020
7a08f3c
Stop Suite execution when time limit exhausted
findepi Nov 10, 2020
5ebaea5
Make create table test rely on wider supported type
ssheikin Nov 9, 2020
7b6bbd8
Update airbase to 104
wendigo Nov 10, 2020
1a40bdd
Add 346 release notes
martint Nov 3, 2020
4cfb04d
[maven-release-plugin] prepare release 346
martint Nov 10, 2020
075985b
[maven-release-plugin] prepare for next development iteration
martint Nov 10, 2020
8e33ab9
Extract utility methods in JDBC module
ebyhr Oct 18, 2020
b0ec1bd
Add support for batching in JDBC driver
ebyhr Aug 16, 2020
85110dd
Add support for limit pushdown in MongoDB
ebyhr Nov 7, 2020
0c19198
Use CentOS 8
Nov 11, 2020
6145109
Add subnet based topology
phd3 Aug 15, 2020
d5f1b38
Fix exception type for failures while decoding property values
Oct 29, 2020
5d17655
Refactor and simplify test by adding property argument
Nov 4, 2020
232b15a
Add Druid unit test class against latest 0.20.0
adamjshook Nov 11, 2020
69b225e
Cleanup styling for copy icon
electrum Nov 11, 2020
8508bfd
Add boolean to DataMappingSmokeTest
ssheikin Nov 10, 2020
be931e7
Parallelize stats update
May 6, 2020
a695095
Make TypeSignature final and @Immutable
findepi Nov 11, 2020
ad51dca
Fix warnings in TestRun
kokosing Nov 11, 2020
293818b
Assume tests container is started immediately
kokosing Nov 11, 2020
640c321
Improve logging when FlakyTestRetryAnalyzer not enabled
findepi Nov 12, 2020
3e7f19c
Update Tempto to 182
findepi Nov 10, 2020
5093988
Update and extend Hive VIEW tests
findepi Nov 10, 2020
24a6956
Test Hive VIEW with functions
findepi Nov 10, 2020
81fd161
Fix FlakyTestRetryAnalyzer in product tests
hashhar Nov 12, 2020
4a776a8
Add toString for Event classes in SPI
losipiuk Nov 12, 2020
8d0842d
Remove some unnecessary usage of Number
findepi Nov 12, 2020
dbc4eaf
Remove redundant use of Type#getObjectValue
findepi Nov 12, 2020
d8a164b
Fix suite-3 definition
wendigo Nov 12, 2020
144ae4a
Reuse immutable partition fields in Glue partition conversion
pettyjamesm Oct 29, 2020
179e8e3
Add support for ALTER VIEW SET AUTHORIZATION
Oct 29, 2020
0792235
Extract SetAuthorizationStatement class
Nov 3, 2020
9f20bfd
Add product tests for changing owner of view in hive
Nov 10, 2020
1b81ae2
Add contains_sequence function
tinkerrrr Oct 19, 2020
675dbd2
Return meaningful message when view stale
findepi Nov 10, 2020
deb971f
Make ReaderPageSource top-level and simplify method names
phd3 Oct 3, 2020
6fdb5fa
Rename ReaderProjections class and simplify method names
phd3 Oct 3, 2020
5e1c0e4
Use ColumnHandle interface in projection adaptation classes
phd3 Oct 3, 2020
548f1ec
Update to ZooKeeper 3.5.8
electrum Nov 10, 2020
c741164
Benchmark lineitem data in BenchmarkColumnReaders
sopel39 Nov 10, 2020
7f09027
Benchmark different compression methods in BenchmarkColumnReaders
sopel39 Nov 10, 2020
52a5829
Remove unused map
sopel39 Nov 10, 2020
9f0f600
Add BenchmarkBlockSerde
sopel39 Nov 10, 2020
15405b8
Add TestLongArrayBlockEncoding
sopel39 Nov 12, 2020
2e1e912
Improve serde performance for Long blocks with no nulls
sopel39 Nov 10, 2020
caa3a78
Improve serde performance for Long blocks with nulls
sopel39 Nov 12, 2020
554cb19
Extract BlockTestUtils#assertBlockEquals
sopel39 Nov 12, 2020
48d115f
Static import Scope.Thread
sopel39 Nov 12, 2020
e1ec17b
Add more test cases to TestExtract for DATE type
choiwaiyiu Oct 22, 2020
c0b2fa7
Remove dependency on presto-tests from Druid, BigQuery
findepi Nov 13, 2020
f7e4135
Avoid readByte and appendByte in nulls to bits serde
sopel39 Nov 13, 2020
a156380
Rename session property to match session property names
sopel39 Nov 13, 2020
cbd98a8
Require Java 11.0.7+
electrum Nov 13, 2020
0293716
Cache hashcode for TypeSignature class
phd3 Nov 9, 2020
99d702b
Allow configuring HDFS replication factor directly in hive.properties
agrawalreetika Aug 22, 2020
d88bfc0
Fix indentation for code block to be part of list
electrum Nov 13, 2020
3acb73b
Clarify Java requirement
electrum Nov 13, 2020
a9591a9
Remove unused variables in presto-product-tests
brandboat Nov 4, 2020
ee73167
Specify locale for String.toUpperCase calls
electrum Nov 12, 2020
126e5e1
Add modernizer rule for String.toUpperCase
electrum Nov 12, 2020
9a68e91
Wait for and build split with dynamic filter in Kudu
lzeiming Oct 19, 2020
8beabd1
Remove obsolete comment
findepi Nov 15, 2020
a33edf5
Log info about failed tests on ERROR
findepi Nov 15, 2020
9253948
Use proper logging API to log exception
findepi Nov 15, 2020
2c1b6cf
Remove unnecessary use of map builder
findepi Nov 14, 2020
328b8af
Remove redundant constructor
findepi Nov 14, 2020
92e16fc
Pass Presto version to FileHiveMetastore
findepi Nov 14, 2020
a97a562
Add writing Presto version to database metadata
findepi Nov 14, 2020
77e03bc
Add writing Presto version to table metadata
findepi Nov 14, 2020
5309ce1
Add version check in file metastore
findepi Nov 14, 2020
7ee7226
Switch actual/expected in assertion
losipiuk Nov 12, 2020
8876534
Rename EventsBuilder to EventsCollector
losipiuk Nov 12, 2020
d2a2959
Rename parameter
losipiuk Nov 12, 2020
f2b51c0
Add per-event filtering to EventsCollector
losipiuk Nov 12, 2020
5d07e31
Split TestEventListener test class
losipiuk Nov 16, 2020
bf41485
Ignore SplitCompleted events in TestEventListenerBasic
losipiuk Nov 16, 2020
cc78247
Fix literal type in a rule
kasiafi Nov 3, 2020
f6ea534
Use proper literal type
kasiafi Nov 3, 2020
6989e3f
Use proper literal type
kasiafi Nov 3, 2020
3e9fbd0
Refactor ValuesNode
kasiafi Nov 10, 2020
f2f8ddf
Support pruning all columns from ValuesNode with non-Row expression
kasiafi Nov 12, 2020
19f4914
Recognize ValuesNode with no rows as a node with distinct output
kasiafi Nov 12, 2020
c4e81f7
Handle the case of no ValuesNode outputs left in PruneUnreferencedOut…
kasiafi Nov 12, 2020
020560f
Populate view owner groups for view access control
electrum Nov 13, 2020
c5fdbe8
Update Postgresql JDBC to 42.2.10
kokosing Nov 14, 2020
063f264
Mark shouldFailOnFirstSerializationError as @Flaky
findepi Nov 16, 2020
8c3a424
Return counts from SetOperationTranslator
kasiafi Nov 5, 2020
e0c6fc3
Rename rules
kasiafi Nov 5, 2020
23c024c
Verify column types in set operation
kasiafi Nov 5, 2020
e9c238d
Remove redundant check
kasiafi Nov 9, 2020
cae3289
Add support for EXCEPT ALL, INTERSECT ALL
kasiafi Nov 16, 2020
1a60078
Make query result HTTP compression client configurable
pettyjamesm Nov 4, 2020
50db495
Make query result HTTP compression server configurable
pettyjamesm Nov 4, 2020
c574d1a
Fix retries for TestIcebergCreateTable
findepi Nov 16, 2020
129a3ff
Simplify QueryExecutor usage in TestIcebergCreateTable
findepi Nov 16, 2020
4233637
Test Hive VIEW with JOIN and subquery
findepi Nov 16, 2020
bcb25ea
Adjust product test timeout
findepi Nov 16, 2020
7079a59
Use different table names to prevent a race when running in parallel
Nov 16, 2020
ef786ea
Remove outdated comment
findepi Nov 17, 2020
f400d5e
Use 'ignore' for ignored variable
findepi Nov 17, 2020
46e0e4c
Add main method to MySQL query runner
ebyhr Oct 18, 2020
b76f8f9
Remove stats fetcher to test for hangs
wendigo Nov 17, 2020
e7c36e3
Dump Launcher threads when suite about to exhaust run time limit
findepi Nov 16, 2020
aa69353
Add applyTableScanRedirect SPI and ApplyTableScanRedirection rule
raunaqmorarka Oct 26, 2020
3fea32d
Implement table scan redirection in TPCH connector
raunaqmorarka Oct 28, 2020
235e426
Implement applyTableScanRedirect API in JdbcMetadata
raunaqmorarka Nov 3, 2020
1c753db
Fix ATDQ.testDataMappingSmokeTest for MemSQL
findepi Nov 18, 2020
2a6b8a4
Mark TestHiveCreateTable as @Flaky
findepi Nov 17, 2020
d19513a
Do not push partial aggregations into TableScan
findepi Nov 17, 2020
9790127
Record scheduled time in QueryCompletedEvent
aalbu Nov 17, 2020
3cab27d
Bump hive-apache to 3.1.2-5
losipiuk Nov 18, 2020
ca13e34
Use TEXTFILE format in TestHiveViews
findepi Nov 18, 2020
0d6da44
Improve formatting
kokosing Nov 8, 2020
b6987f0
Remove redundant String.format invocation
kokosing Nov 8, 2020
850b086
Use static imports for String.format
kokosing Nov 8, 2020
a64f42b
Remove redundant list item bullet
mosabua Nov 19, 2020
96d7a4b
Minor cleanup in checks involving ConnectorSession for Procedure
Praveen2112 Nov 18, 2020
d7f1f2c
Inject ConnectorAccessControl for Procedures
Praveen2112 Oct 1, 2020
285ccce
Validate user objects for HiveProcedures
Praveen2112 Oct 1, 2020
9c44343
Make RedshiftClientModule#getConnectionFactory static
sopel39 Nov 19, 2020
d3ee586
Stream container statistics
wendigo Nov 17, 2020
548b04d
Update JLine to 3.17.1
wendigo Nov 9, 2020
0397edb
Use real executable CLI jar in product tests
wendigo Nov 9, 2020
198760d
Execute queries from redirected input stream
wendigo Nov 9, 2020
14e8dc0
Extract terminal utils
wendigo Nov 10, 2020
db5d02d
Extract BaseMongoDistributedQueries
adamjshook Nov 17, 2020
c483c06
Add Mongo unit test classes for latest 3.6.20 and 4.4.1
adamjshook Nov 17, 2020
2eb5d31
Update MongoDB docs with tested versions
adamjshook Nov 17, 2020
c646a7b
Enable unused variable error prone check
brandboat Nov 17, 2020
2830044
Fix formatting
sopel39 Nov 19, 2020
146caba
Make sure redirected table column types match source column types
sopel39 Nov 19, 2020
65167a5
Add scan physical size stats to query completed event
dain Nov 8, 2020
7acb7dc
Fix @Flaky pattern for "Error committing write to Hive"
findepi Nov 19, 2020
1118784
Verify pattern in @Flaky
findepi Nov 19, 2020
089bbdb
Remove unused variable
electrum Nov 19, 2020
46066bc
Rename parameters to satisfy UnusedVariable
electrum Nov 19, 2020
2c0da69
Use assertThatThrownBy over @Test.expectedExceptions
findepi Nov 19, 2020
058ea31
Make the type mismatch on redirect message more concise
findepi Nov 19, 2020
dc1e5ef
Use PT timeout on CI only
findepi Nov 17, 2020
2ee1a03
Fix Launcher failure when suite remaining time is zero
hashhar Nov 19, 2020
9f5545e
Get expected CLI version from resource file
losipiuk Nov 20, 2020
de57a1a
Add missing comma
sopel39 Nov 20, 2020
66ffde0
Fix local maven build of presto-testng-services
kokosing Nov 20, 2020
24092e3
Replace assertUntilTimeout with assertEventually
findepi Nov 20, 2020
d89dac7
Make Presto web UI more accessible when executing tests
findepi Nov 20, 2020
9c12ca2
Make naming regarding Kafka read tests more explicit
hashhar Nov 3, 2020
ffcdd48
Fix Kafka Avro encoder to use mappings
hashhar Nov 5, 2020
e42f44a
Fix Kafka CSV, JSON and RAW encoders to use mappings
hashhar Nov 6, 2020
0139bbb
Add Kafka pushdown smoke tests
hashhar Nov 10, 2020
a8f5738
Refactor Kafka Producer factory
hashhar Nov 14, 2020
f60a220
Refactor Kafka Admin factory
hashhar Nov 14, 2020
b595d89
Restructure LdapAuthenticator code
dain Nov 9, 2020
7d55dac
Add LdapAuthenticatorClient abstraction
dain Nov 9, 2020
574f193
Add unit test for LdapAuthenticator
dain Nov 9, 2020
69c2b4e
Support multiple LDAP user bind patterns
dain Nov 9, 2020
05409df
Add abstractions to simplify JdkLdapAuthenticatorClient
dain Nov 18, 2020
e9431b0
Remove test tables reliably
findepi Nov 21, 2020
025ccc3
Be more resilient to left overs from previous failure
findepi Nov 21, 2020
c00a45f
Use shorter table identifier in test
losipiuk Nov 9, 2020
b34d017
Drop Oracle specific copy of test
losipiuk Nov 9, 2020
a5136c8
Fix formatting
findepi Aug 24, 2020
ffa47a1
Streamline conversions when column accessed by label
findepi Nov 21, 2020
ece62ab
Add helper method for getting decimal digits from JdbcTypeHandle
findepi Nov 20, 2020
8bb64a0
Fix formatting
findepi Nov 20, 2020
faa49b3
Extract decimal read functions
findepi Nov 20, 2020
a11d460
Add decimal mappings factory methods without rounding mode
findepi Nov 21, 2020
696e10b
Move TableDescriptionSupplier to separate guice module
elonazoulay Nov 22, 2020
d1f4700
Organize benchmarks in BenchmarkBlockSerde
Nov 16, 2020
efb4c48
Add more types to BenchmarkBlockSerde
Nov 16, 2020
ec149b7
Add different null distributions to BenchmarkBlockSerde
Nov 16, 2020
930a3c8
Remove TestingPagesSerdeFactory from BenchmarkBlockSerde
Nov 17, 2020
72736fc
Allow to control FlakyTestRetryAnalyzer with session property
kokosing Nov 22, 2020
2e94a1d
Move test specific setup out of query runner creation
findepi Nov 23, 2020
7e6e8e4
Remove createPostgreSqlQueryRunner overload
findepi Nov 23, 2020
21aa9a5
Fix query runner leak in TestPrometheusIntegrationTests3
findepi Nov 23, 2020
96af6c3
Remove redundant check
findepi Nov 23, 2020
c11d4e8
Remove redundant session field in a test
findepi Nov 23, 2020
d85a222
Add link to statistics page from Hive connector
mosabua Nov 23, 2020
ca63974
Add utility class to render tabular data in the console
wendigo Nov 22, 2020
746cec0
Format suite results as a table
wendigo Nov 22, 2020
9a14c6c
Format environment container list as table
wendigo Nov 22, 2020
81fb119
Use random suite test run id to mark execution in logs
wendigo Nov 22, 2020
cb53cbe
Display multiline values in a table
wendigo Nov 22, 2020
02d7aa0
Format suite test runs as a table
wendigo Nov 22, 2020
f8c487f
Remove PairLike class from Prometheus tests
findepi Nov 23, 2020
bef604f
Pass session to PredicatePushdownController#apply
sopel39 Nov 23, 2020
3abd7b3
Move basic pushdown types to PredicatePushdownController
sopel39 Nov 23, 2020
b5586da
Compact pushed domains in JDBC by default (with default limit of 32)
sopel39 Nov 23, 2020
8577457
Fix formatting
sopel39 Nov 23, 2020
d80ad86
Allow connector to specify max domain size
sopel39 Nov 23, 2020
7643fab
Fix nullability declaration of concat_ws function
dain Nov 21, 2020
f7b7274
Add concat_ws to functions index
dain Nov 21, 2020
ba27abb
Add product test for nested Hive views
alexjo2144 Nov 23, 2020
4b8615d
Make RedisPlugin immutable
findepi Nov 23, 2020
d14fdf9
Allow predicate pushdown after aggregation pushdown
alexjo2144 Nov 18, 2020
742c1b9
Support ANALYZE in blackhole
kokosing Nov 20, 2020
da50a0b
Support DELETE in blackhole
kokosing Nov 20, 2020
fb1ecae
Support views in blackhole
kokosing Nov 20, 2020
f489c5d
Extract TestAccessControl
kokosing Nov 20, 2020
df99ed7
Update JDBI version to 3.9.1
sopel39 Nov 25, 2020
7d9c8db
Report actual class on mismatch
findepi Nov 25, 2020
0f8500c
Remove unused method
findepi Nov 25, 2020
88d5d90
Update JDBI to 3.17.0
sopel39 Nov 25, 2020
c413914
Add 347 release notes
martint Nov 23, 2020
dd0f786
[maven-release-plugin] prepare release 347
martint Nov 25, 2020
d041b8e
[maven-release-plugin] prepare for next development iteration
martint Nov 25, 2020
c88b2f0
Add explanation for calcite-core dependency exclusion
findepi Nov 24, 2020
72eb05a
Simplify loading columns into cache in CachingJdbcClient
ssheikin Nov 24, 2020
02dd292
Remove unused exception declaration
martint Nov 25, 2020
ac9a322
Document ldap.ignore-referrals config
electrum Nov 23, 2020
1c83f38
Improve bind pattern description
electrum Nov 23, 2020
f9a060e
Decrease table column width
electrum Nov 23, 2020
b9e3f42
Use static import
kokosing Nov 25, 2020
28bc79b
Make filterColumns to be coherent with other filter methods
kokosing Nov 25, 2020
cd542ac
Remove version-based condition from TestHiveBasicTableStatistics
findepi Nov 25, 2020
e300ae8
Ensure no operator info is ignored
findepi Nov 25, 2020
6697955
Fix container startup time measurements when start retried
findepi Nov 25, 2020
bcb24d0
Fix caching for TableHandle in CachingJdbcClient
ssheikin Nov 24, 2020
1a73f83
Implement tests for CachingJdbcClient
ssheikin Nov 25, 2020
463c231
Use Cache instead of LoadingCache
ssheikin Nov 24, 2020
3582199
Make testUnwrap more flexible
findepi Nov 25, 2020
a0c5155
Verify expected plan consistently
findepi Nov 25, 2020
a10aaf1
Separate tested behavior from mechanics in TestUnwrapCastInComparison
findepi Nov 25, 2020
5f0a0a0
Add extra wait time for query Events in tests
losipiuk Nov 26, 2020
ff2d42a
Drop extra query-completed event for queries failing during preparation
losipiuk Nov 26, 2020
621cc20
Allow running multiple suites
wendigo Nov 26, 2020
510208a
Fix formatting
sopel39 Nov 26, 2020
47dbf0a
Make sure operators have matching ids across tasks
sopel39 Nov 26, 2020
f84cf5e
Remove redundant LocalExecutionPlanContext#getSession
sopel39 Nov 26, 2020
ae830d6
Propagate more information from ConnectorSession to ConnectionFactory
ssheikin Nov 23, 2020
df4fe40
Validate operator type when merging OperatorStats
sopel39 Nov 27, 2020
b983b9a
Fix formatting
sopel39 Nov 27, 2020
4c2e09e
Merge null and non-null cases in BenchmarkBlockSerde
Nov 23, 2020
8461ec1
Extract data generation from BenchmarkBlockSerde
Nov 23, 2020
8eb2fa9
Mark TestSyncPartitionMetadata as @Flaky
findepi Nov 27, 2020
714bf35
Make OperatorHashCollisionsStats self-contained
sopel39 Nov 27, 2020
2103f11
Move assertExplainAnalyze to AbstractTestQueryFramework
sopel39 Nov 27, 2020
9e6bb08
Gather plan node auxiliary statistics separately
sopel39 Nov 26, 2020
e95dac7
Fix collisions reporting for joins
sopel39 Nov 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make testUnwrap more flexible
  • Loading branch information
findepi committed Nov 27, 2020
commit 3582199a116e99302f1d67ec56e09c3d6d8ecc7b
Original file line number Diff line number Diff line change
Expand Up @@ -882,39 +882,39 @@ public void testCastTimestampToTimestampWithTimeZone()
Session losAngelesSession = withZone(session, TimeZoneKey.getTimeZoneKey("America/Los_Angeles"));

// same zone
testUnwrap(utcSession, "timestamp(0)", "> TIMESTAMP '2020-10-26 11:02:18 UTC'", "> TIMESTAMP '2020-10-26 11:02:18'");
testUnwrap(warsawSession, "timestamp(0)", "> TIMESTAMP '2020-10-26 11:02:18 Europe/Warsaw'", "> TIMESTAMP '2020-10-26 11:02:18'");
testUnwrap(losAngelesSession, "timestamp(0)", "> TIMESTAMP '2020-10-26 11:02:18 America/Los_Angeles'", "> TIMESTAMP '2020-10-26 11:02:18'");
testUnwrap(utcSession, "timestamp(0)", "a > TIMESTAMP '2020-10-26 11:02:18 UTC'", "a > TIMESTAMP '2020-10-26 11:02:18'");
testUnwrap(warsawSession, "timestamp(0)", "a > TIMESTAMP '2020-10-26 11:02:18 Europe/Warsaw'", "a > TIMESTAMP '2020-10-26 11:02:18'");
testUnwrap(losAngelesSession, "timestamp(0)", "a > TIMESTAMP '2020-10-26 11:02:18 America/Los_Angeles'", "a > TIMESTAMP '2020-10-26 11:02:18'");

// different zone
testUnwrap(warsawSession, "timestamp(0)", "> TIMESTAMP '2020-10-26 11:02:18 UTC'", "> TIMESTAMP '2020-10-26 12:02:18'");
testUnwrap(losAngelesSession, "timestamp(0)", "> TIMESTAMP '2020-10-26 11:02:18 UTC'", "> TIMESTAMP '2020-10-26 04:02:18'");
testUnwrap(warsawSession, "timestamp(0)", "a > TIMESTAMP '2020-10-26 11:02:18 UTC'", "a > TIMESTAMP '2020-10-26 12:02:18'");
testUnwrap(losAngelesSession, "timestamp(0)", "a > TIMESTAMP '2020-10-26 11:02:18 UTC'", "a > TIMESTAMP '2020-10-26 04:02:18'");

// short timestamp, short timestamp with time zone being coerced to long timestamp with time zone
testUnwrap(warsawSession, "timestamp(6)", "> TIMESTAMP '2020-10-26 11:02:18.12 UTC'", "> TIMESTAMP '2020-10-26 12:02:18.120000'");
testUnwrap(losAngelesSession, "timestamp(6)", "> TIMESTAMP '2020-10-26 11:02:18.12 UTC'", "> TIMESTAMP '2020-10-26 04:02:18.120000'");
testUnwrap(warsawSession, "timestamp(6)", "a > TIMESTAMP '2020-10-26 11:02:18.12 UTC'", "a > TIMESTAMP '2020-10-26 12:02:18.120000'");
testUnwrap(losAngelesSession, "timestamp(6)", "a > TIMESTAMP '2020-10-26 11:02:18.12 UTC'", "a > TIMESTAMP '2020-10-26 04:02:18.120000'");

// long timestamp, short timestamp with time zone being coerced to long timestamp with time zone
testUnwrap(warsawSession, "timestamp(9)", "> TIMESTAMP '2020-10-26 11:02:18.12 UTC'", "> TIMESTAMP '2020-10-26 12:02:18.120000000'");
testUnwrap(losAngelesSession, "timestamp(9)", "> TIMESTAMP '2020-10-26 11:02:18.12 UTC'", "> TIMESTAMP '2020-10-26 04:02:18.120000000'");
testUnwrap(warsawSession, "timestamp(9)", "a > TIMESTAMP '2020-10-26 11:02:18.12 UTC'", "a > TIMESTAMP '2020-10-26 12:02:18.120000000'");
testUnwrap(losAngelesSession, "timestamp(9)", "a > TIMESTAMP '2020-10-26 11:02:18.12 UTC'", "a > TIMESTAMP '2020-10-26 04:02:18.120000000'");

// long timestamp, long timestamp with time zone
testUnwrap(warsawSession, "timestamp(9)", "> TIMESTAMP '2020-10-26 11:02:18.123456 UTC'", "> TIMESTAMP '2020-10-26 12:02:18.123456000'");
testUnwrap(losAngelesSession, "timestamp(9)", "> TIMESTAMP '2020-10-26 11:02:18.123456 UTC'", "> TIMESTAMP '2020-10-26 04:02:18.123456000'");
testUnwrap(warsawSession, "timestamp(9)", "a > TIMESTAMP '2020-10-26 11:02:18.123456 UTC'", "a > TIMESTAMP '2020-10-26 12:02:18.123456000'");
testUnwrap(losAngelesSession, "timestamp(9)", "a > TIMESTAMP '2020-10-26 11:02:18.123456 UTC'", "a > TIMESTAMP '2020-10-26 04:02:18.123456000'");

// maximum precision
testUnwrap(warsawSession, "timestamp(12)", "> TIMESTAMP '2020-10-26 11:02:18.123456789321 UTC'", "> TIMESTAMP '2020-10-26 12:02:18.123456789321'");
testUnwrap(losAngelesSession, "timestamp(12)", "> TIMESTAMP '2020-10-26 11:02:18.123456789321 UTC'", "> TIMESTAMP '2020-10-26 04:02:18.123456789321'");
testUnwrap(warsawSession, "timestamp(12)", "a > TIMESTAMP '2020-10-26 11:02:18.123456789321 UTC'", "a > TIMESTAMP '2020-10-26 12:02:18.123456789321'");
testUnwrap(losAngelesSession, "timestamp(12)", "a > TIMESTAMP '2020-10-26 11:02:18.123456789321 UTC'", "a > TIMESTAMP '2020-10-26 04:02:18.123456789321'");

// DST forward -- Warsaw changed clock 1h forward on 2020-03-29T01:00 UTC (2020-03-29T02:00 local time)
// Note that in given session input TIMESTAMP values 2020-03-29 02:31 and 2020-03-29 03:31 produce the same value 2020-03-29 01:31 UTC (conversion is not monotonic)
// last before
testUnwrap(warsawSession, "timestamp(0)", "> TIMESTAMP '2020-03-29 00:59:59 UTC'", "> TIMESTAMP '2020-03-29 01:59:59'");
testUnwrap(warsawSession, "timestamp(3)", "> TIMESTAMP '2020-03-29 00:59:59.999 UTC'", "> TIMESTAMP '2020-03-29 01:59:59.999'");
testUnwrap(warsawSession, "timestamp(6)", "> TIMESTAMP '2020-03-29 00:59:59.13 UTC'", "> TIMESTAMP '2020-03-29 01:59:59.130000'");
testUnwrap(warsawSession, "timestamp(6)", "> TIMESTAMP '2020-03-29 00:59:59.999999 UTC'", "> TIMESTAMP '2020-03-29 01:59:59.999999'");
testUnwrap(warsawSession, "timestamp(9)", "> TIMESTAMP '2020-03-29 00:59:59.999999999 UTC'", "> TIMESTAMP '2020-03-29 01:59:59.999999999'");
testUnwrap(warsawSession, "timestamp(12)", "> TIMESTAMP '2020-03-29 00:59:59.999999999999 UTC'", "> TIMESTAMP '2020-03-29 01:59:59.999999999999'");
testUnwrap(warsawSession, "timestamp(0)", "a > TIMESTAMP '2020-03-29 00:59:59 UTC'", "a > TIMESTAMP '2020-03-29 01:59:59'");
testUnwrap(warsawSession, "timestamp(3)", "a > TIMESTAMP '2020-03-29 00:59:59.999 UTC'", "a > TIMESTAMP '2020-03-29 01:59:59.999'");
testUnwrap(warsawSession, "timestamp(6)", "a > TIMESTAMP '2020-03-29 00:59:59.13 UTC'", "a > TIMESTAMP '2020-03-29 01:59:59.130000'");
testUnwrap(warsawSession, "timestamp(6)", "a > TIMESTAMP '2020-03-29 00:59:59.999999 UTC'", "a > TIMESTAMP '2020-03-29 01:59:59.999999'");
testUnwrap(warsawSession, "timestamp(9)", "a > TIMESTAMP '2020-03-29 00:59:59.999999999 UTC'", "a > TIMESTAMP '2020-03-29 01:59:59.999999999'");
testUnwrap(warsawSession, "timestamp(12)", "a > TIMESTAMP '2020-03-29 00:59:59.999999999999 UTC'", "a > TIMESTAMP '2020-03-29 01:59:59.999999999999'");
// first within
testNoUnwrap(warsawSession, "timestamp(0)", "> TIMESTAMP '2020-03-29 01:00:00 UTC'", "timestamp(0) with time zone");
testNoUnwrap(warsawSession, "timestamp(3)", "> TIMESTAMP '2020-03-29 01:00:00.000 UTC'", "timestamp(3) with time zone");
Expand All @@ -928,38 +928,38 @@ public void testCastTimestampToTimestampWithTimeZone()
testNoUnwrap(warsawSession, "timestamp(9)", "> TIMESTAMP '2020-03-29 01:59:59.999999999 UTC'", "timestamp(9) with time zone");
testNoUnwrap(warsawSession, "timestamp(12)", "> TIMESTAMP '2020-03-29 01:59:59.999999999999 UTC'", "timestamp(12) with time zone");
// first after
testUnwrap(warsawSession, "timestamp(0)", "> TIMESTAMP '2020-03-29 02:00:00 UTC'", "> TIMESTAMP '2020-03-29 04:00:00'");
testUnwrap(warsawSession, "timestamp(3)", "> TIMESTAMP '2020-03-29 02:00:00.000 UTC'", "> TIMESTAMP '2020-03-29 04:00:00.000'");
testUnwrap(warsawSession, "timestamp(6)", "> TIMESTAMP '2020-03-29 02:00:00.000000 UTC'", "> TIMESTAMP '2020-03-29 04:00:00.000000'");
testUnwrap(warsawSession, "timestamp(9)", "> TIMESTAMP '2020-03-29 02:00:00.000000000 UTC'", "> TIMESTAMP '2020-03-29 04:00:00.000000000'");
testUnwrap(warsawSession, "timestamp(12)", "> TIMESTAMP '2020-03-29 02:00:00.000000000000 UTC'", "> TIMESTAMP '2020-03-29 04:00:00.000000000000'");
testUnwrap(warsawSession, "timestamp(0)", "a > TIMESTAMP '2020-03-29 02:00:00 UTC'", "a > TIMESTAMP '2020-03-29 04:00:00'");
testUnwrap(warsawSession, "timestamp(3)", "a > TIMESTAMP '2020-03-29 02:00:00.000 UTC'", "a > TIMESTAMP '2020-03-29 04:00:00.000'");
testUnwrap(warsawSession, "timestamp(6)", "a > TIMESTAMP '2020-03-29 02:00:00.000000 UTC'", "a > TIMESTAMP '2020-03-29 04:00:00.000000'");
testUnwrap(warsawSession, "timestamp(9)", "a > TIMESTAMP '2020-03-29 02:00:00.000000000 UTC'", "a > TIMESTAMP '2020-03-29 04:00:00.000000000'");
testUnwrap(warsawSession, "timestamp(12)", "a > TIMESTAMP '2020-03-29 02:00:00.000000000000 UTC'", "a > TIMESTAMP '2020-03-29 04:00:00.000000000000'");

// DST backward -- Warsaw changed clock 1h backward on 2020-10-25T01:00 UTC (2020-03-29T03:00 local time)
// Note that in given session no input TIMESTAMP value can produce TIMESTAMP WITH TIME ZONE within [2020-10-25 00:00:00 UTC, 2020-10-25 01:00:00 UTC], so '>=' is OK
// last before
testUnwrap(warsawSession, "timestamp(0)", "> TIMESTAMP '2020-10-25 00:59:59 UTC'", ">= TIMESTAMP '2020-10-25 02:59:59'");
testUnwrap(warsawSession, "timestamp(3)", "> TIMESTAMP '2020-10-25 00:59:59.999 UTC'", ">= TIMESTAMP '2020-10-25 02:59:59.999'");
testUnwrap(warsawSession, "timestamp(6)", "> TIMESTAMP '2020-10-25 00:59:59.999999 UTC'", ">= TIMESTAMP '2020-10-25 02:59:59.999999'");
testUnwrap(warsawSession, "timestamp(9)", "> TIMESTAMP '2020-10-25 00:59:59.999999999 UTC'", ">= TIMESTAMP '2020-10-25 02:59:59.999999999'");
testUnwrap(warsawSession, "timestamp(12)", "> TIMESTAMP '2020-10-25 00:59:59.999999999999 UTC'", ">= TIMESTAMP '2020-10-25 02:59:59.999999999999'");
testUnwrap(warsawSession, "timestamp(0)", "a > TIMESTAMP '2020-10-25 00:59:59 UTC'", "a >= TIMESTAMP '2020-10-25 02:59:59'");
testUnwrap(warsawSession, "timestamp(3)", "a > TIMESTAMP '2020-10-25 00:59:59.999 UTC'", "a >= TIMESTAMP '2020-10-25 02:59:59.999'");
testUnwrap(warsawSession, "timestamp(6)", "a > TIMESTAMP '2020-10-25 00:59:59.999999 UTC'", "a >= TIMESTAMP '2020-10-25 02:59:59.999999'");
testUnwrap(warsawSession, "timestamp(9)", "a > TIMESTAMP '2020-10-25 00:59:59.999999999 UTC'", "a >= TIMESTAMP '2020-10-25 02:59:59.999999999'");
testUnwrap(warsawSession, "timestamp(12)", "a > TIMESTAMP '2020-10-25 00:59:59.999999999999 UTC'", "a >= TIMESTAMP '2020-10-25 02:59:59.999999999999'");
// first within
testUnwrap(warsawSession, "timestamp(0)", "> TIMESTAMP '2020-10-25 01:00:00 UTC'", "> TIMESTAMP '2020-10-25 02:00:00'");
testUnwrap(warsawSession, "timestamp(3)", "> TIMESTAMP '2020-10-25 01:00:00.000 UTC'", "> TIMESTAMP '2020-10-25 02:00:00.000'");
testUnwrap(warsawSession, "timestamp(6)", "> TIMESTAMP '2020-10-25 01:00:00.000000 UTC'", "> TIMESTAMP '2020-10-25 02:00:00.000000'");
testUnwrap(warsawSession, "timestamp(9)", "> TIMESTAMP '2020-10-25 01:00:00.000000000 UTC'", "> TIMESTAMP '2020-10-25 02:00:00.000000000'");
testUnwrap(warsawSession, "timestamp(12)", "> TIMESTAMP '2020-10-25 01:00:00.000000000000 UTC'", "> TIMESTAMP '2020-10-25 02:00:00.000000000000'");
testUnwrap(warsawSession, "timestamp(0)", "a > TIMESTAMP '2020-10-25 01:00:00 UTC'", "a > TIMESTAMP '2020-10-25 02:00:00'");
testUnwrap(warsawSession, "timestamp(3)", "a > TIMESTAMP '2020-10-25 01:00:00.000 UTC'", "a > TIMESTAMP '2020-10-25 02:00:00.000'");
testUnwrap(warsawSession, "timestamp(6)", "a > TIMESTAMP '2020-10-25 01:00:00.000000 UTC'", "a > TIMESTAMP '2020-10-25 02:00:00.000000'");
testUnwrap(warsawSession, "timestamp(9)", "a > TIMESTAMP '2020-10-25 01:00:00.000000000 UTC'", "a > TIMESTAMP '2020-10-25 02:00:00.000000000'");
testUnwrap(warsawSession, "timestamp(12)", "a > TIMESTAMP '2020-10-25 01:00:00.000000000000 UTC'", "a > TIMESTAMP '2020-10-25 02:00:00.000000000000'");
// last within
testUnwrap(warsawSession, "timestamp(0)", "> TIMESTAMP '2020-10-25 01:59:59 UTC'", "> TIMESTAMP '2020-10-25 02:59:59'");
testUnwrap(warsawSession, "timestamp(3)", "> TIMESTAMP '2020-10-25 01:59:59.999 UTC'", "> TIMESTAMP '2020-10-25 02:59:59.999'");
testUnwrap(warsawSession, "timestamp(6)", "> TIMESTAMP '2020-10-25 01:59:59.999999 UTC'", "> TIMESTAMP '2020-10-25 02:59:59.999999'");
testUnwrap(warsawSession, "timestamp(9)", "> TIMESTAMP '2020-10-25 01:59:59.999999999 UTC'", "> TIMESTAMP '2020-10-25 02:59:59.999999999'");
testUnwrap(warsawSession, "timestamp(12)", "> TIMESTAMP '2020-10-25 01:59:59.999999999999 UTC'", "> TIMESTAMP '2020-10-25 02:59:59.999999999999'");
testUnwrap(warsawSession, "timestamp(0)", "a > TIMESTAMP '2020-10-25 01:59:59 UTC'", "a > TIMESTAMP '2020-10-25 02:59:59'");
testUnwrap(warsawSession, "timestamp(3)", "a > TIMESTAMP '2020-10-25 01:59:59.999 UTC'", "a > TIMESTAMP '2020-10-25 02:59:59.999'");
testUnwrap(warsawSession, "timestamp(6)", "a > TIMESTAMP '2020-10-25 01:59:59.999999 UTC'", "a > TIMESTAMP '2020-10-25 02:59:59.999999'");
testUnwrap(warsawSession, "timestamp(9)", "a > TIMESTAMP '2020-10-25 01:59:59.999999999 UTC'", "a > TIMESTAMP '2020-10-25 02:59:59.999999999'");
testUnwrap(warsawSession, "timestamp(12)", "a > TIMESTAMP '2020-10-25 01:59:59.999999999999 UTC'", "a > TIMESTAMP '2020-10-25 02:59:59.999999999999'");
// first after
testUnwrap(warsawSession, "timestamp(0)", "> TIMESTAMP '2020-10-25 02:00:00 UTC'", "> TIMESTAMP '2020-10-25 03:00:00'");
testUnwrap(warsawSession, "timestamp(3)", "> TIMESTAMP '2020-10-25 02:00:00.000 UTC'", "> TIMESTAMP '2020-10-25 03:00:00.000'");
testUnwrap(warsawSession, "timestamp(6)", "> TIMESTAMP '2020-10-25 02:00:00.000000 UTC'", "> TIMESTAMP '2020-10-25 03:00:00.000000'");
testUnwrap(warsawSession, "timestamp(9)", "> TIMESTAMP '2020-10-25 02:00:00.000000000 UTC'", "> TIMESTAMP '2020-10-25 03:00:00.000000000'");
testUnwrap(warsawSession, "timestamp(12)", "> TIMESTAMP '2020-10-25 02:00:00.000000000000 UTC'", "> TIMESTAMP '2020-10-25 03:00:00.000000000000'");
testUnwrap(warsawSession, "timestamp(0)", "a > TIMESTAMP '2020-10-25 02:00:00 UTC'", "a > TIMESTAMP '2020-10-25 03:00:00'");
testUnwrap(warsawSession, "timestamp(3)", "a > TIMESTAMP '2020-10-25 02:00:00.000 UTC'", "a > TIMESTAMP '2020-10-25 03:00:00.000'");
testUnwrap(warsawSession, "timestamp(6)", "a > TIMESTAMP '2020-10-25 02:00:00.000000 UTC'", "a > TIMESTAMP '2020-10-25 03:00:00.000000'");
testUnwrap(warsawSession, "timestamp(9)", "a > TIMESTAMP '2020-10-25 02:00:00.000000000 UTC'", "a > TIMESTAMP '2020-10-25 03:00:00.000000000'");
testUnwrap(warsawSession, "timestamp(12)", "a > TIMESTAMP '2020-10-25 02:00:00.000000000000 UTC'", "a > TIMESTAMP '2020-10-25 03:00:00.000000000000'");
}

@Test
Expand Down Expand Up @@ -1090,13 +1090,13 @@ private void testNoUnwrap(Session session, String inputType, String inputPredica

private void testUnwrap(Session session, String inputType, String inputPredicate, String expectedPredicate)
{
String sql = format("SELECT * FROM (VALUES CAST(NULL AS %s)) t(a) WHERE a %s", inputType, inputPredicate);
String sql = format("SELECT * FROM (VALUES CAST(NULL AS %s)) t(a) WHERE %s", inputType, inputPredicate);
try {
assertPlan(sql,
session,
anyTree(
filter("A " + expectedPredicate,
values("A"))));
filter(expectedPredicate,
values("a"))));
}
catch (Throwable e) {
e.addSuppressed(new Exception("Query: " + sql));
Expand Down