vldpyatkov commented on code in PR #13366:
URL: https://github.com/apache/ignite/pull/13366#discussion_r3720203821
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/IgniteSqlValidator.java:
##########
@@ -198,10 +214,19 @@ private void validateTableModify(SqlNode table) {
SqlIdentifier alias = call.getAlias() != null ? call.getAlias() :
new SqlIdentifier(deriveAlias(targetTable, 0), SqlParserPos.ZERO);
-
table.unwrap(IgniteTable.class).descriptor().selectForUpdateRowType((IgniteTypeFactory)typeFactory)
- .getFieldNames().stream()
- .map(name -> alias.plus(name, SqlParserPos.ZERO))
- .forEach(selectList::add);
+ RelDataType updateRowType =
table.unwrap(IgniteTable.class).descriptor()
+ .selectForUpdateRowType(typeFactory());
+
+ for (RelDataTypeField field : updateRowType.getFieldList()) {
+ if (QueryUtils.VER_FIELD_NAME.equals(field.getName())) {
+ selectList.add(SqlValidatorUtil.addAlias(
Review Comment:
It is an approach to avoid passing the _ver field despite tha fact that is
in type descrition.
--
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]