morningman commented on code in PR #35322:
URL: https://github.com/apache/doris/pull/35322#discussion_r1615430061


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/PartitionTableInfo.java:
##########
@@ -191,6 +194,27 @@ public void validatePartitionInfo(
                         "Duplicated partition column " + 
duplicatesKeys.get(0));
             }
 
+            if (engineName.equals(CreateTableInfo.ENGINE_HIVE)) {
+                // 1. Not all columns can be partition fields
+                // 2. The partition field must be at the end of the schema
+                // 3. The order of partition fields in the schema
+                //    must be consistent with the order defined in 
`PARTITIONED BY LIST()`
+                if (partitionColumns.size() == columns.size()) {
+                    throw new AnalysisException("Not all columns can be 
partition fields.");

Review Comment:
   ```suggestion
                       throw new AnalysisException("Cannot set all columns as 
partitioning columns.");
   ```



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to