aturoczy commented on code in PR #5497:
URL: https://github.com/apache/hive/pull/5497#discussion_r1808573305


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteSemanticException.java:
##########
@@ -34,7 +34,7 @@ public enum UnsupportedFeature {
     Having_clause_without_any_groupby, Invalid_column_reference, 
Invalid_decimal,
     Less_than_equal_greater_than, Others, Same_name_in_multiple_expressions,
     Schema_less_table, Select_alias_in_having_clause, Select_transform, 
Subquery,
-    Table_sample_clauses, UDTF, Union_type, Unique_join,
+    Table_sample_clauses, UDTF, Unique_join,

Review Comment:
   Clarification: The Union_type is not need anymore?



##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java:
##########
@@ -421,13 +420,7 @@ private static RelNode createMaterializedViewScan(HiveConf 
conf, Table viewTable
     }
 
     // 1.3 Build row type from field <type, name>
-    RelDataType rowType;
-    try {
-      rowType = TypeConverter.getType(cluster, rr, null);
-    } catch (CalciteSemanticException e) {
-      // Bail out
-      return null;
-    }
+    RelDataType rowType = TypeConverter.getType(cluster, rr, null);

Review Comment:
   btw it is more cleaner. :) 



##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java:
##########
@@ -421,13 +420,7 @@ private static RelNode createMaterializedViewScan(HiveConf 
conf, Table viewTable
     }
 
     // 1.3 Build row type from field <type, name>
-    RelDataType rowType;
-    try {
-      rowType = TypeConverter.getType(cluster, rr, null);
-    } catch (CalciteSemanticException e) {
-      // Bail out
-      return null;
-    }
+    RelDataType rowType = TypeConverter.getType(cluster, rr, null);

Review Comment:
   Calcite exception does not need to handle anymore? I guess the internal 
exception will throw in a higher level, and does not need to handle the null. 
But I want to highlight, this could be behavior change if the caller handle 
null.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to