lowka commented on code in PR #1528:
URL: https://github.com/apache/ignite-3/pull/1528#discussion_r1082915985
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteSqlValidator.java:
##########
@@ -114,6 +119,35 @@ public IgniteSqlValidator(SqlOperatorTable opTab,
CalciteCatalogReader catalogRe
this.parameters = parameters;
}
+ /** {@inheritDoc} */
+ @Override
+ public SqlNode validate(SqlNode topNode) {
+ this.dynamicParameterCount = 0;
+ try {
+ SqlNode topNodeToValidate;
+ // Calcite fails to validate a query when its top node is EXPLAIN
PLAN FOR
+ // java.lang.NullPointerException: namespace for <query>
+ // at
org.apache.calcite.sql.validate.SqlValidatorImpl.getNamespaceOrThrow(SqlValidatorImpl.java:1280)
+ if (topNode instanceof SqlExplain) {
+ topNodeToValidate = ((SqlExplain) topNode).getExplicandum();
+ // We do not validate dynamic parameters in case of EXPLAIN
FOR queries since they may be omitted.
+ // TODO: We must enable this check for EXPLAIN ANALYSE flavour
for EXPLAIN FOR queries.
Review Comment:
We should open an issue for this one.
--
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]