[ 
https://issues.apache.org/jira/browse/CALCITE-4145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CALCITE-4145:
------------------------------------
    Labels: pull-request-available  (was: )

> Exception when query from UDF field with structured type
> --------------------------------------------------------
>
>                 Key: CALCITE-4145
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4145
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.23.0, 1.24.0
>            Reporter: Danny Chen
>            Assignee: Danny Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.25.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Check this sql in {{SqlToRelConverterTest}}
> {code:java}
> @Test void testUdfWithStructuredReturnType() {
>     final String sql = "SELECT deptno, tmp.r.not_null_field, 
> tmp.r.nullable_field FROM\n"
>         + "(SELECT deptno, ROW_FUNC() AS r from dept)tmp";
>     sql(sql).ok();
>   }
> {code}
> {{ArrayIndexOutOfBoundsException}} throws because the nested field got a -1 
> index when querying the field by simple name.
> To solve the problem, for a nested field, return its parent field's 
> monotonicity.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to