amaliujia commented on a change in pull request #10967: [BEAM-9300] convert
struct literal in ZetaSQL
URL: https://github.com/apache/beam/pull/10967#discussion_r385393357
##########
File path:
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/translation/ExpressionConverter.java
##########
@@ -962,20 +980,28 @@ private RexNode
convertResolvedParameter(ResolvedParameter parameter) {
}
private RexNode convertResolvedStructFieldAccess(ResolvedGetStructField
resolvedGetStructField) {
- return rexBuilder()
- .makeFieldAccess(
- convertRexNodeFromResolvedExpr(resolvedGetStructField.getExpr()),
- (int) resolvedGetStructField.getFieldIdx());
+ RexNode referencedExpr =
convertRexNodeFromResolvedExpr(resolvedGetStructField.getExpr());
+ return convertResolvedStructFieldAccessInternal(
Review comment:
I have lost some of my memory on this code path:
just a question: does this work with deep nested ROW? E.g.
`ROW(ROW(ROW(...)..)...)`
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services