Skip to content

Commit

Permalink
Move timezone with timestamp check to intermediate stage
Browse files Browse the repository at this point in the history
  • Loading branch information
feilong-liu committed Aug 5, 2024
1 parent 45a52a7 commit ce85e97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public PlanChecker(FeaturesConfig featuresConfig, boolean forceSingleNode)
new DynamicFiltersChecker(),
new WarnOnScanWithoutPartitionPredicate(featuresConfig));
if (featuresConfig.isNativeExecutionEnabled() && featuresConfig.isDisableTimeStampWithTimeZoneForNative()) {
builder.put(Stage.FINAL, new CheckNoTimestampWithTimezoneType());
builder.put(Stage.INTERMEDIATE, new CheckNoTimestampWithTimezoneType());
}
checkers = builder.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,11 @@ public void testTimestampWithTimeZone()

assertQueryFails("SELECT timezone_hour(from_unixtime(orderkey, 'Asia/Oral')) FROM orders", ".*Timestamp with Timezone type is not supported in Prestissimo.*");
assertQueryFails("SELECT timezone_minute(from_unixtime(orderkey, 'Asia/Kolkata')) FROM orders", ".*Timestamp with Timezone type is not supported in Prestissimo.*");

Session filterPushdown = Session.builder(getSession())
.setCatalogSessionProperty("hive", "pushdown_filter_enabled", "true")
.build();
assertQueryFails(filterPushdown, "select distinct custkey from orders where date_diff('day', from_unixtime(orderkey), TIMESTAMP '2023-01-01 00:00:00 UTC') = 150", ".*Timestamp with Timezone type is not supported in Prestissimo.*");
}

@Test
Expand Down

0 comments on commit ce85e97

Please sign in to comment.