[
https://issues.apache.org/jira/browse/BEAM-7024?focusedWorklogId=223909&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-223909
]
ASF GitHub Bot logged work on BEAM-7024:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Apr/19 22:43
Start Date: 05/Apr/19 22:43
Worklog Time Spent: 10m
Work Description: amaliujia commented on pull request #8242: [BEAM-7024]
Calcite BINARY to Beam Schema BYTES missing in CalciteUtils
URL: https://github.com/apache/beam/pull/8242#discussion_r272763687
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/utils/CalciteUtils.java
##########
@@ -156,8 +156,26 @@ public static boolean isStringType(FieldType fieldType) {
.put(TIMESTAMP_WITH_LOCAL_TZ,
SqlTypeName.TIMESTAMP_WITH_LOCAL_TIME_ZONE)
.build();
- private static final BiMap<SqlTypeName, FieldType>
CALCITE_TO_BEAM_TYPE_MAPPING =
- BEAM_TO_CALCITE_TYPE_MAPPING.inverse();
+ private static final ImmutableMap<SqlTypeName, FieldType>
CALCITE_TO_BEAM_TYPE_MAPPING =
+ ImmutableMap.<SqlTypeName, FieldType>builder()
+ .put(SqlTypeName.TINYINT, TINY_INT)
+ .put(SqlTypeName.SMALLINT, SMALL_INT)
+ .put(SqlTypeName.INTEGER, INTEGER)
+ .put(SqlTypeName.BIGINT, BIG_INT)
+ .put(SqlTypeName.FLOAT, FLOAT)
+ .put(SqlTypeName.DOUBLE, DOUBLE)
+ .put(SqlTypeName.DECIMAL, DECIMAL)
+ .put(SqlTypeName.BOOLEAN, BOOLEAN)
+ .put(SqlTypeName.VARBINARY, VARBINARY)
+ .put(SqlTypeName.BINARY, VARBINARY)
Review comment:
Both BINARY and VARBINARY should be mapped to `VARBINARY`, which is
FieldType.BYTES.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 223909)
Time Spent: 20m (was: 10m)
> Calcite BINARY to Beam Schema BYTES missing in CalciteUtils
> -----------------------------------------------------------
>
> Key: BEAM-7024
> URL: https://issues.apache.org/jira/browse/BEAM-7024
> Project: Beam
> Issue Type: Bug
> Components: dsl-sql
> Reporter: Rui Wang
> Assignee: Rui Wang
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)