kgyrtkirk commented on code in PR #15195:
URL: https://github.com/apache/druid/pull/15195#discussion_r1365159093
##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidSqlValidator.java:
##########
@@ -39,4 +44,23 @@ protected DruidSqlValidator(
{
super(opTab, catalogReader, typeFactory, validatorConfig);
}
+
+ @Override
+ public void validateCall(SqlCall call, SqlValidatorScope scope)
+ {
+ if (call.getKind() == SqlKind.NULLS_FIRST) {
+ SqlNode op0 = call.getOperandList().get(0);
+ if (op0.getKind() == SqlKind.DESCENDING) {
+ throw InvalidSqlInput.exception("DESCENDING ordering with NULLS FIRST
is not supported!");
Review Comment:
I think it would probably make more sense to leave it like this for now -
and instead of just fixing this one instance - replace all possible
`InvalidSqlInput` -s with an alternate (which could pinpoint the sql location)
and use that everywhere.
--
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]