You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Andrei Sereda (Jira)" <ji...@apache.org> on 2020/08/22 18:49:03 UTC
[jira] [Closed] (CALCITE-4145) Exception when query from UDF field
with structured type
[ https://issues.apache.org/jira/browse/CALCITE-4145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrei Sereda closed CALCITE-4145.
----------------------------------
Released as part of 1.25 ([68b02dfd4af15bc|https://github.com/apache/calcite/commit/68b02dfd4af15bc94a91a0cd2a30655d04439555])
> 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: 40m
> 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)