marton-bod commented on a change in pull request #2348:
URL: https://github.com/apache/hive/pull/2348#discussion_r646390216
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##########
@@ -13456,6 +13457,26 @@ ASTNode analyzeCreateTable(
}
}
+ HiveStorageHandler handler = null;
+ try {
+ handler = HiveUtils.getStorageHandler(conf,
storageFormat.getStorageHandler());
+ } catch (HiveException e) {
+ throw new SemanticException("Failed to load storage handler: " +
e.getMessage());
+ }
+
+ if (handler != null) {
+ String fileFormatPropertyKey = handler.getFileFormatPropertyKey();
+ if (fileFormatPropertyKey != null) {
+ if (tblProps != null && tblProps.containsKey(fileFormatPropertyKey) &&
storageFormat.getSerdeProps() != null &&
Review comment:
A quick clarifying question: this section handles the case when both
`STORED AS ORC` and `TBLPROPERTIES` are defined in the same DDL query? If so,
why do we need the `&& storageFormat.getSerdeProps() != null` part? If we used
`||` instead, would that work too for validating both the tblproperties and the
serdeproperties case?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]