LakshSingla commented on code in PR #12580:
URL: https://github.com/apache/druid/pull/12580#discussion_r885226618
##########
sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlParserUtils.java:
##########
@@ -159,7 +160,11 @@ public static Granularity
convertSqlNodeToGranularity(SqlNode sqlNode) throws Pa
catch (IllegalArgumentException e) {
throw new ParseException(StringUtils.format("%s is an invalid period
string", granularitySqlNode.toString()));
}
- return new PeriodGranularity(period, null, null);
+ Granularity granularity = new PeriodGranularity(period, null, null);
Review Comment:
This check shouldn't be here, because the method is merely supposed to be
converting the given `sqlNode` to a Granularity. This check should be performed
either in the Planner, DruidSqlInsertNode or the FTL file IMO.
--
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]