[ https://issues.apache.org/jira/browse/BEAM-7024?focusedWorklogId=223912&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-223912 ]
ASF GitHub Bot logged work on BEAM-7024: ---------------------------------------- Author: ASF GitHub Bot Created on: 05/Apr/19 22:44 Start Date: 05/Apr/19 22:44 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_r272763788 ########## 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: BINARY might generate from `select b'test_string'`. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 223912) Time Spent: 40m (was: 0.5h) > 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: 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)