Vladsz83 commented on code in PR #11606: URL: https://github.com/apache/ignite/pull/11606#discussion_r1810648308
########## modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/IgniteSqlValidator.java: ########## @@ -524,15 +524,19 @@ private boolean isSystemFieldName(String alias) { /** {@inheritDoc} */ @Override protected void inferUnknownTypes(RelDataType inferredType, SqlValidatorScope scope, SqlNode node) { - if (node instanceof SqlDynamicParam && inferredType.equals(unknownType)) { - if (parameters.length > ((SqlDynamicParam)node).getIndex()) { - Object param = parameters[((SqlDynamicParam)node).getIndex()]; + if (node instanceof SqlDynamicParam ) { + if (inferredType.equals(unknownType)) { + if (parameters.length > ((SqlDynamicParam)node).getIndex()) { + Object param = parameters[((SqlDynamicParam)node).getIndex()]; - setValidatedNodeType(node, (param == null) ? typeFactory().createSqlType(SqlTypeName.NULL) : - typeFactory().toSql(typeFactory().createType(param.getClass()))); + setValidatedNodeType(node, (param == null) ? typeFactory().createSqlType(SqlTypeName.NULL) : Review Comment: In `IgniteSqlValidator` for example. No need to create type every time for every null param. -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org