danny0405 commented on a change in pull request #2203:
URL: https://github.com/apache/calcite/pull/2203#discussion_r503659103
##########
File path: core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
##########
@@ -360,6 +365,18 @@ private static String
cannotStreamResultsForNonStreamingInputs(String inputs) {
sql("SELECT +'abc' from (values(true))").ok();
}
+ @Test void testNiladicForBigQuery() throws Exception {
+ final SchemaPlus rootSchema = Frameworks.createRootSchema(true);
+ final FrameworkConfig config = Frameworks.newConfigBuilder()
+
.parserConfig(SqlParser.config().withConformance(SqlConformanceEnum.BIG_QUERY))
+ .defaultSchema(rootSchema)
+ .build();
+ Planner planner = Frameworks.getPlanner(config);
+ SqlNode node = planner.parse("select current_time, current_time(),
current_date, "
+ + "current_date(), current_timestamp, current_timestamp()");
Review comment:
You can just use
`sql(xxx).withConformance(SqlConformanceEnum.BIG_QUERY).ok()`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]