tkalkirill commented on code in PR #13464:
URL: https://github.com/apache/ignite/pull/13464#discussion_r3765920448
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/IgnitePlanner.java:
##########
@@ -343,7 +343,14 @@ private static boolean isAsCall(SqlNode node) {
/** {@inheritDoc} */
@Override public RelRoot rel(SqlNode sql) {
- SqlToRelConverter sqlToRelConverter = sqlToRelConverter(validator(),
catalogReader, sqlToRelConverterCfg);
+ // TODO: https://issues.apache.org/jira/browse/CALCITE-7592
+ // Restore the original implementation after upgrading to Calcite
1.43: use validator() directly and remove
+ // deriveLimitDynamicParameterTypes().
+ IgniteSqlValidator validator = (IgniteSqlValidator)validator();
Review Comment:
This change was carried over from the previous Calcite 1.40-based
implementation. At that time, the issue was reproducible for `FETCH`
expressions containing dynamic parameters after an SQL rewrite, particularly
`NVL(?, ...)`.
I rechecked the scenario with the current code, including
`testFetchExpressionWithRewrite`, and the issue is no longer reproducible:
`validateFetch()` already derives the parameter types from the rewritten
`FETCH` expression. Therefore, this additional traversal and the cast are no
longer necessary, and I will remove them.
--
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]