You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Andrew Pilloud (Jira)" <ji...@apache.org> on 2021/05/07 17:54:00 UTC

[jira] [Updated] (BEAM-8888) BeamSQL does not support LogicalType

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

Andrew Pilloud updated BEAM-8888:
---------------------------------
    Fix Version/s: 2.22.0
         Assignee: Robin Qiu
       Resolution: Fixed
           Status: Resolved  (was: Triage Needed)

SQL supports LogcalType and this error message has been improved (in https://github.com/apache/beam/pull/11272), so I'm going to resolve this issue. If you have a specific logical type you want supported, please open a feature request like BEAM-9361 for enum.

 The new error looks something like this:

{{Cannot find a matching Calcite SqlTypeName for Beam type: FieldType\{typeName=LOGICAL_TYPE, logicalType=...}}}

> BeamSQL does not support LogicalType
> ------------------------------------
>
>                 Key: BEAM-8888
>                 URL: https://issues.apache.org/jira/browse/BEAM-8888
>             Project: Beam
>          Issue Type: Improvement
>          Components: dsl-sql
>            Reporter: Julien Tournay
>            Assignee: Robin Qiu
>            Priority: P3
>             Fix For: 2.22.0
>
>
> When running a BeamSQL query in a row with a Schema that contains a logical type a NPE is thrown with the following cause:
> {{}}{{ Cause: java.lang.NullPointerException:}}
>  {{[info] at org.apache.beam.repackaged.sql.org.apache.calcite.sql.type.SqlTypeFactoryImpl.createSqlType(SqlTypeFactoryImpl.java:45)}}
>  {{[info] at org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils.toRelDataType(CalciteUtils.java:278)}}
>  {{[info] at org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils.toRelDataType(CalciteUtils.java:285)}}
>  {{[info] at org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils.lambda$toCalciteRowType$0(CalciteUtils.java:260)}}
>  {{[info] at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:110)}}
>   
> This is because {{CalciteUtils.toSqlTypeName}} returns null in the general case if the type is Logical.
>  
>  



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