You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/08/16 13:20:21 UTC
[GitHub] [calcite] danny0405 commented on a change in pull request #1374:
[CALCITE-3138] RelStructuredTypeFlattener doesn't restructure ROW type fields
danny0405 commented on a change in pull request #1374: [CALCITE-3138] RelStructuredTypeFlattener doesn't restructure ROW type fields
URL: https://github.com/apache/calcite/pull/1374#discussion_r314716204
##########
File path: core/src/main/java/org/apache/calcite/sql2rel/RelStructuredTypeFlattener.java
##########
@@ -934,7 +968,21 @@ private RexNode flattenComparison(
return conjunction;
}
}
+
+ }
+
+ private int getNewInnerOrdinal(RexNode firstOp, String literalString) {
+ int newInnerOrdinal = 0;
+ for (RelDataTypeField field : firstOp.getType().getFieldList()) {
+ if (literalString.equalsIgnoreCase(field.getName())) {
+ break;
Review comment:
I don't think this is right to match the fist flattened field just by name, how do you know what the (struct type field original) operator is ? It seems only right if they are all `ITEM` operators.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services