[ 
https://issues.apache.org/jira/browse/BEAM-5210?focusedWorklogId=138166&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-138166
 ]

ASF GitHub Bot logged work on BEAM-5210:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Aug/18 01:37
            Start Date: 26/Aug/18 01:37
    Worklog Time Spent: 10m 
      Work Description: XuMingmin commented on a change in pull request #6270: 
[BEAM-5210] Support VARBINARY in BeamSqlPrimitive
URL: https://github.com/apache/beam/pull/6270#discussion_r212812664
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/utils/CalciteUtils.java
 ##########
 @@ -49,6 +49,7 @@
           .put(FieldType.DECIMAL, SqlTypeName.DECIMAL)
           .put(FieldType.BOOLEAN, SqlTypeName.BOOLEAN)
           .put(FieldType.BYTES, SqlTypeName.VARBINARY)
+          .put(FieldType.BYTES, SqlTypeName.BINARY)
 
 Review comment:
   In SQL itself, `BINARY` and `VARBINARY` are not distinguished significantly. 
I prefer to have both mapping to `BYTES`, same as `CHAR` and `VARCHAR`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 138166)
    Time Spent: 2h 20m  (was: 2h 10m)

> VARBINARY is not supported in BeamSqlPrimitive
> ----------------------------------------------
>
>                 Key: BEAM-5210
>                 URL: https://issues.apache.org/jira/browse/BEAM-5210
>             Project: Beam
>          Issue Type: Bug
>          Components: dsl-sql
>            Reporter: Xu Mingmin
>            Assignee: Xu Mingmin
>            Priority: Major
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> See error as below
> {code}
> Caused by: java.lang.UnsupportedOperationException: Unsupported Beam SQL type 
> in expression: VARBINARY
>       at 
> org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlPrimitive.accept(BeamSqlPrimitive.java:158)
>       at 
> org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlPrimitive.<init>(BeamSqlPrimitive.java:44)
>       at 
> org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlPrimitive.of(BeamSqlPrimitive.java:56)
>       at 
> org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlInputRefExpression.evaluate(BeamSqlInputRefExpression.java:42)
>       at 
> org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlExpressionEnvironments$ListEnvironment.getLocalRef(BeamSqlExpressionEnvironments.java:92)
>       at 
> org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlLocalRefExpression.evaluate(BeamSqlLocalRefExpression.java:44)
>       at 
> org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlFnExecutor.lambda$execute$0(BeamSqlFnExecutor.java:557)
>       at 
> java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
>       at 
> java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
>       at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
>       at 
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
>       at 
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
>       at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
>       at 
> java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
>       at 
> org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlFnExecutor.execute(BeamSqlFnExecutor.java:558)
>       at 
> org.apache.beam.sdk.extensions.sql.impl.rel.BeamCalcRel$CalcFn.processElement(BeamCalcRel.java:116)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to