ahmedabu98 commented on code in PR #38206:
URL: https://github.com/apache/beam/pull/38206#discussion_r3119497359


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/utils/CalciteUtils.java:
##########
@@ -254,6 +261,9 @@ public static Schema.Field toField(String name, RelDataType 
calciteType) {
   }
 
   public static FieldType toFieldType(RelDataType calciteType) {
+    if (LOGICAL_TYPE_REL_DATA_MAPPING.containsKey(calciteType)) {
+      return LOGICAL_TYPE_REL_DATA_MAPPING.get(calciteType);
+    }

Review Comment:
   Is it safe to rely on RelDataType equality for Map keys?
   
   Would it be better to store a mapping of `RelDataType.getSqlTypeName()` --> 
`FieldType` ? 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to