szlta commented on a change in pull request #3060:
URL: https://github.com/apache/hive/pull/3060#discussion_r816959131



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##########
@@ -8128,13 +8128,9 @@ private FileSinkDesc createFileSinkDesc(String dest, 
TableDesc table_desc,
       // Some non-native tables might be partitioned without partition spec 
information being present in the Table object
       HiveStorageHandler storageHandler = dest_tab.getStorageHandler();
       if (storageHandler != null && storageHandler.alwaysUnpartitioned()) {
-        List<PartitionTransformSpec> nonNativePartSpecs = 
storageHandler.getPartitionTransformSpec(dest_tab);
-        if (dpCtx == null && nonNativePartSpecs != null && 
!nonNativePartSpecs.isEmpty()) {
-          verifyDynamicPartitionEnabled(conf, qb, dest);
-          Map<String, String> partSpec = new LinkedHashMap<>();
-          nonNativePartSpecs.forEach(ps -> partSpec.put(ps.getColumnName(), 
null));
-          dpCtx = new DynamicPartitionCtx(partSpec, 
conf.getVar(HiveConf.ConfVars.DEFAULTPARTITIONNAME),
-              
conf.getIntVar(HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTSPERNODE));
+        DynamicPartitionCtx nonNativeDpCtx = 
storageHandler.createDPContext(conf, dest_tab);
+        if (dpCtx == null && nonNativeDpCtx != null) {

Review comment:
       That's right. It's because Hive doesn't know about partition column in 
Iceberg tables, so doesn't bother creating a dynamic partitioning context at 
all..




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