We have Avro schema that contains nested structure and when querying using 
Flink SQL, we are getting below error.

Exception in thread "main" java.lang.AssertionError
        at 
org.apache.calcite.sql.parser.SqlParserPos.sum_(SqlParserPos.java:236)
        at org.apache.calcite.sql.parser.SqlParserPos.sum(SqlParserPos.java:226)
        at 
org.apache.calcite.sql.SqlIdentifier.getComponent(SqlIdentifier.java:232)
        at 
org.apache.calcite.sql.validate.DelegatingScope.fullyQualify(DelegatingScope.java:416)
        at 
org.apache.calcite.sql.validate.SqlValidatorImpl$Expander.visit(SqlValidatorImpl.java:5733)
        at 
org.apache.calcite.sql.validate.SqlValidatorImpl$Expander.visit(SqlValidatorImpl.java:5718)
        at org.apache.calcite.sql.SqlIdentifier.accept(SqlIdentifier.java:317)

Example Schema:
ROW<`col1` VARCHAR(2147483647), `postalAddress` ROW<`addressLine1` 
VARCHAR(2147483647), `addressLine2` VARCHAR(2147483647), `addressLine3` 
VARCHAR(2147483647)>>

Example SQL:
insert into CSVSink
select
col1,
postalAddress.addressLine1 as address
from myStream

In Flink SQL, How to select nested elements ?

Reply via email to