alex-plekhanov commented on code in PR #11606:
URL: https://github.com/apache/ignite/pull/11606#discussion_r1810618356
##########
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:
`typeFactory().createSqlType(SqlTypeName.NULL)` used only once. Where it
might be cached?
--
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]