deniskuzZ commented on code in PR #4453:
URL: https://github.com/apache/hive/pull/4453#discussion_r1246529203


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java:
##########
@@ -291,18 +292,40 @@ private void analyzeLoad(ASTNode ast) throws 
SemanticException {
           ErrorMsg.INVALID_PATH.getMsg(), fromTree, e.getMessage()), e);
     }
 
+    Map<String, String> tmpPartSpec = null;
+    Table table;
+    try {
+      TableName tableName = 
HiveTableName.withNoDefault(getUnescapedName((ASTNode) tableTree.getChild(0)));
+      table = db.getTable(tableName);
+    } catch (HiveException e) {
+      throw new SemanticException(
+          
ASTErrorUtils.getMsg(ErrorMsg.CANNOT_RETRIEVE_TABLE_METADATA.getMsg(), 
tableTree.getChild(0), e.getMessage()),
+          e);
+    }
+    boolean isUseNativeApi = conf.getBoolVar(HIVE_LOAD_DATA_USE_NATIVE_API);
+    boolean nativeSupportsAppendWithPartClause = false;
+    if (isUseNativeApi && tableTree.getChildCount() == 2 && 
table.isNonNative() &&
+        table.getStorageHandler().supportsAppendData(table.getTTable(), true)) 
{
+
+      tmpPartSpec = getPartSpec(tableTree, true);

Review Comment:
   DP shouldn't be supported in native API
   ````
   tmpPartSpec = {HashMap@33218}  size = 2
    "pcol" -> "300"
    "pcol2" -> null
   LOAD DATA LOCAL INPATH '../../data/files/parquet_partition/pcol=100' INTO 
TABLE ice_parquet_partitioned
   PARTITION (pcol='300', pcol2);
   ````
   Caused by: java.lang.NumberFormatException: For input string: "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