cryptoe commented on code in PR #12589:
URL: https://github.com/apache/druid/pull/12589#discussion_r886857567
##########
sql/src/main/codegen/includes/common.ftl:
##########
@@ -65,6 +65,11 @@ org.apache.druid.java.util.common.Pair<Granularity, String>
PartitionGranularity
e = Expression(ExprContext.ACCEPT_SUB_QUERY)
{
granularity =
DruidSqlParserUtils.convertSqlNodeToGranularityThrowingParseExceptions(e);
+ if(!GranularityType.isStandard(granularity))
+ {
+ throw new IAE("The granularity specified in PARTITIONED BY is not
supported. "
+ + "Please use a standard granularity.");
Review Comment:
IMHO I would map GranularityType.values() to period and then use a string
Joiner with "," and put that in the exception message.
--
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]