zachjsh commented on code in PR #15836:
URL: https://github.com/apache/druid/pull/15836#discussion_r1480431964
##########
sql/src/test/java/org/apache/druid/sql/calcite/parser/DruidSqlParserUtilsTest.java:
##########
@@ -133,6 +133,26 @@ public void testGetGranularityFromFloor() throws
ParseException
Granularity actualGranularity =
DruidSqlParserUtils.convertSqlNodeToGranularityThrowingParseExceptions(floorCall);
Assert.assertEquals(expectedGranularity, actualGranularity);
}
+
+ /**
+ * Tests clause like "PARTITIONED BY 'day'"
+ * @throws ParseException
+ */
+ @Test
+ public void testConvertSqlNodeToGranularityAsLiteral() throws
ParseException
+ {
+ SqlNode sqlNode = SqlLiteral.createCharString(timeUnit.name(),
SqlParserPos.ZERO);
+ Granularity actualGranularity =
DruidSqlParserUtils.convertSqlNodeToGranularityThrowingParseExceptions(sqlNode);
+ Assert.assertEquals(expectedGranularity, actualGranularity);
+ }
+
+ @Test
Review Comment:
added
##########
sql/src/main/codegen/includes/common.ftl:
##########
@@ -18,58 +18,52 @@
*/
// Using fully qualified name for Pair class, since Calcite also has a same
class name being used in the Parser.jj
Review Comment:
removed
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]