[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-27 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 28/Aug/18 04:29
Start Date: 28/Aug/18 04:29
Worklog Time Spent: 10m 
  Work Description: XuMingmin closed pull request #6270: [BEAM-5210] 
Support VARBINARY in BeamSqlPrimitive
URL: https://github.com/apache/beam/pull/6270
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitive.java
 
b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitive.java
index b6942913c41..3e442fe7c11 100644
--- 
a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitive.java
+++ 
b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitive.java
@@ -24,6 +24,7 @@
 import 
org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlExpressionEnvironment;
 import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
 import org.apache.beam.sdk.values.Row;
+import org.apache.calcite.avatica.util.ByteString;
 import org.apache.calcite.sql.type.SqlTypeName;
 import org.apache.calcite.util.NlsString;
 import org.joda.time.ReadableInstant;
@@ -131,6 +132,8 @@ public boolean accept() {
   case CHAR:
   case VARCHAR:
 return value instanceof String || value instanceof NlsString;
+  case VARBINARY:
+return value instanceof byte[] || value instanceof ByteString;
   case TIME:
   case TIMESTAMP:
   case DATE:
diff --git 
a/sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitiveTest.java
 
b/sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitiveTest.java
index dcf1fbf0fdb..040fc262db0 100644
--- 
a/sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitiveTest.java
+++ 
b/sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitiveTest.java
@@ -19,6 +19,7 @@
 
 import 
org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlExpressionEnvironments;
 import 
org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlFnExecutorTestBase;
+import org.apache.calcite.avatica.util.ByteString;
 import org.apache.calcite.sql.type.SqlTypeName;
 import org.junit.Assert;
 import org.junit.Test;
@@ -34,6 +35,24 @@ public void testPrimitiveInt() {
 expInt.evaluate(row, null, 
BeamSqlExpressionEnvironments.empty()).getValue());
   }
 
+  @Test
+  public void testPrimitiveBytes1() {
+BeamSqlPrimitive expBytes =
+BeamSqlPrimitive.of(SqlTypeName.VARBINARY, new byte[] {1, 2, 3});
+Assert.assertEquals(
+expBytes.getValue(),
+expBytes.evaluate(row, null, 
BeamSqlExpressionEnvironments.empty()).getValue());
+  }
+
+  @Test
+  public void testPrimitiveBytes2() {
+BeamSqlPrimitive expBytes =
+BeamSqlPrimitive.of(SqlTypeName.VARBINARY, ByteString.of("123ABC", 
16));
+Assert.assertEquals(
+expBytes.getValue(),
+expBytes.evaluate(row, null, 
BeamSqlExpressionEnvironments.empty()).getValue());
+  }
+
   @Test(expected = IllegalArgumentException.class)
   public void testPrimitiveTypeUnMatch1() {
 BeamSqlPrimitive expInt = BeamSqlPrimitive.of(SqlTypeName.INTEGER, 100L);
@@ -65,4 +84,12 @@ public void testPrimitiveTypeUnMatch4() {
 expInt.getValue(),
 expInt.evaluate(row, null, 
BeamSqlExpressionEnvironments.empty()).getValue());
   }
+
+  @Test(expected = IllegalArgumentException.class)
+  public void testPrimitiveTypeUnMatch5() {
+BeamSqlPrimitive expBytes = BeamSqlPrimitive.of(SqlTypeName.VARBINARY, 
100L);
+Assert.assertEquals(
+expBytes.getValue(),
+expBytes.evaluate(row, null, 
BeamSqlExpressionEnvironments.empty()).getValue());
+  }
 }


 


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: 138650)
Time Spent: 3h 20m  (was: 3h 10m)

> VARBINARY is not supported in BeamSqlPrimitive
> 

[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-27 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 28/Aug/18 01:20
Start Date: 28/Aug/18 01:20
Worklog Time Spent: 10m 
  Work Description: XuMingmin commented on issue #6270: [BEAM-5210] Support 
VARBINARY in BeamSqlPrimitive
URL: https://github.com/apache/beam/pull/6270#issuecomment-416419421
 
 
   retest this please


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: 138605)
Time Spent: 3h 10m  (was: 3h)

> 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: 3h 10m
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-27 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 27/Aug/18 22:55
Start Date: 27/Aug/18 22:55
Worklog Time Spent: 10m 
  Work Description: XuMingmin commented on issue #6270: [BEAM-5210] Support 
VARBINARY in BeamSqlPrimitive
URL: https://github.com/apache/beam/pull/6270#issuecomment-416395202
 
 
   Thanks, let me squash and merge it.


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: 138590)
Time Spent: 3h  (was: 2h 50m)

> 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: 3h
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-26 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 27/Aug/18 03:07
Start Date: 27/Aug/18 03:07
Worklog Time Spent: 10m 
  Work Description: amaliujia commented on issue #6270: [BEAM-5210] Support 
VARBINARY in BeamSqlPrimitive
URL: https://github.com/apache/beam/pull/6270#issuecomment-416101800
 
 
   Thanks for this fix!


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: 138276)
Time Spent: 2h 50m  (was: 2h 40m)

> 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 50m
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-26 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 26/Aug/18 06:59
Start Date: 26/Aug/18 06:59
Worklog Time Spent: 10m 
  Work Description: XuMingmin commented on issue #6270: [BEAM-5210] Support 
VARBINARY in BeamSqlPrimitive
URL: https://github.com/apache/beam/pull/6270#issuecomment-416018485
 
 
   retest this please


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: 138178)
Time Spent: 2h 40m  (was: 2.5h)

> 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 40m
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-26 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 26/Aug/18 06:26
Start Date: 26/Aug/18 06:26
Worklog Time Spent: 10m 
  Work Description: XuMingmin commented on issue #6270: [BEAM-5210] Support 
VARBINARY in BeamSqlPrimitive
URL: https://github.com/apache/beam/pull/6270#issuecomment-416017171
 
 
   Update: notice compile issue with `SqlTypeName.BINARY`. I'd focus on the bug 
first and leave `SqlTypeName.BINARY` in future work.


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: 138176)
Time Spent: 2.5h  (was: 2h 20m)

> 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: 2.5h
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-25 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/BEAM-5210?focusedWorklogId=138166=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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-25 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 26/Aug/18 01:32
Start Date: 26/Aug/18 01:32
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_r212812614
 
 

 ##
 File path: .gitignore
 ##
 @@ -79,3 +79,4 @@ sdks/python/nosetests.xml
 # NOTE: if you modify this file, you probably need to modify the file set that
 # is an input to 'maven-assembly-plugin' that generates source distribution.
 # This is typically in files named 'src.xml' throughout this repository.
+/.gradle/
 
 Review comment:
   yes, let me remove it


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: 138165)
Time Spent: 2h 10m  (was: 2h)

> 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 10m
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


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

 ##
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitive.java
 ##
 @@ -131,6 +132,8 @@ public boolean accept() {
   case CHAR:
   case VARCHAR:
 return value instanceof String || value instanceof NlsString;
+  case VARBINARY:
 
 Review comment:
   There is no `BYTES` in 
[SqlTypeName](https://calcite.apache.org/apidocs/org/apache/calcite/sql/type/SqlTypeName.html),
 `BINARY` is missed though.


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: 137999)
Time Spent: 2h  (was: 1h 50m)

> 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
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


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

 ##
 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:
   There is no support for BINARY in `BeamSqlPrimitive.java`


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: 137995)
Time Spent: 1h 40m  (was: 1.5h)

> 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: 1h 40m
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


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

 ##
 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:
   There is no support for BINARY in `BeamSqlPrimitive.java`


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: 137996)
Time Spent: 1h 50m  (was: 1h 40m)

> 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: 1h 50m
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


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

 ##
 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:
   I am not getting this change. After it, it will have `BYTES` mapping to both 
`BINARY` and `VARBINARY`. It does not pass compilation.


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: 137994)
Time Spent: 1.5h  (was: 1h 20m)

> 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: 1.5h
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


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

 ##
 File path: 
sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitiveTest.java
 ##
 @@ -34,6 +34,15 @@ public void testPrimitiveInt() {
 expInt.evaluate(row, null, 
BeamSqlExpressionEnvironments.empty()).getValue());
   }
 
+  @Test
+  public void testPrimitiveBytes() {
+BeamSqlPrimitive expBytes =
+BeamSqlPrimitive.of(SqlTypeName.VARBINARY, new byte[] {1, 2, 3});
 
 Review comment:
   Why not test `ByteString` as well?


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: 137992)
Time Spent: 1h 20m  (was: 1h 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: 1h 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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 24/Aug/18 21:26
Start Date: 24/Aug/18 21:26
Worklog Time Spent: 10m 
  Work Description: apilloud commented on issue #6270: [BEAM-5210] Support 
VARBINARY in BeamSqlPrimitive
URL: https://github.com/apache/beam/pull/6270#issuecomment-415886836
 
 
   LGTM.


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: 137991)
Time Spent: 1h 10m  (was: 1h)

> 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: 1h 10m
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


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

 ##
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitive.java
 ##
 @@ -131,6 +132,8 @@ public boolean accept() {
   case CHAR:
   case VARCHAR:
 return value instanceof String || value instanceof NlsString;
+  case VARBINARY:
 
 Review comment:
   You should add a `BYTES` case here too.


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: 137990)
Time Spent: 1h  (was: 50m)

> 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: 1h
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


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

 ##
 File path: .gitignore
 ##
 @@ -79,3 +79,4 @@ sdks/python/nosetests.xml
 # NOTE: if you modify this file, you probably need to modify the file set that
 # is an input to 'maven-assembly-plugin' that generates source distribution.
 # This is typically in files named 'src.xml' throughout this repository.
+/.gradle/
 
 Review comment:
   Did this slip through on accident?


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: 137989)
Time Spent: 50m  (was: 40m)

> 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: 50m
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 24/Aug/18 21:06
Start Date: 24/Aug/18 21:06
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_r212755447
 
 

 ##
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitive.java
 ##
 @@ -131,6 +131,8 @@ public boolean accept() {
   case CHAR:
   case VARCHAR:
 return value instanceof String || value instanceof NlsString;
+  case VARBINARY:
+return value instanceof byte[];
 
 Review comment:
   good point, I only considered the type in `Row`, let me update it.


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: 137987)
Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-23 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 23/Aug/18 23:50
Start Date: 23/Aug/18 23:50
Worklog Time Spent: 10m 
  Work Description: XuMingmin commented on issue #6270: [BEAM-5210] Support 
VARBINARY in BeamSqlPrimitive
URL: https://github.com/apache/beam/pull/6270#issuecomment-415608167
 
 
   retest this please


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: 137626)
Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
>  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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-23 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


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

 ##
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/operator/BeamSqlPrimitive.java
 ##
 @@ -131,6 +131,8 @@ public boolean accept() {
   case CHAR:
   case VARCHAR:
 return value instanceof String || value instanceof NlsString;
+  case VARBINARY:
+return value instanceof byte[];
 
 Review comment:
   Calcite is using `ByteString` for both BINARY and VARBINARY: 
https://calcite.apache.org/avatica/apidocs/org/apache/calcite/avatica/util/ByteString.html
 We should match, as that will minimize pain when I pull in the Calcite Rex 
code generation.


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: 137620)
Time Spent: 20m  (was: 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: 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.(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)


[jira] [Work logged] (BEAM-5210) VARBINARY is not supported in BeamSqlPrimitive

2018-08-23 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5210:


Author: ASF GitHub Bot
Created on: 23/Aug/18 23:20
Start Date: 23/Aug/18 23:20
Worklog Time Spent: 10m 
  Work Description: XuMingmin opened a new pull request #6270: [BEAM-5210] 
Support VARBINARY in BeamSqlPrimitive
URL: https://github.com/apache/beam/pull/6270
 
 
   A quick bug fix to support VARBINARY in BeamSqlPrimitive.
   
   R: @apilloud @akedin @xumingming @amaliujia  @vectorijk


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: 137615)
Time Spent: 10m
Remaining Estimate: 0h

> 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: 10m
>  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.(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)