Aitozi commented on PR #22363:
URL: https://github.com/apache/flink/pull/22363#issuecomment-1498810787

   This PR does not support the partition column with nested type, due to it 
has been limited in `SqlCreateTableConverter#verifyPartitioningColumnsExist`. 
So the partition column should only work with the top level column now.
   
   ```
    private void verifyPartitioningColumnsExist(Schema mergedSchema, 
List<String> partitionKeys) {
     Set<String> columnNames =
             mergedSchema.getColumns().stream()
                     .map(Schema.UnresolvedColumn::getName)
                     .collect(Collectors.toCollection(LinkedHashSet::new));
     for (String partitionKey : partitionKeys) {
         if (!columnNames.contains(partitionKey)) {
             throw new ValidationException(
                     String.format(
                             "Partition column '%s' not defined in the table 
schema. Available columns: [%s]",
                             partitionKey,
                             columnNames.stream()
                                     .collect(Collectors.joining("', '", "'", 
"'"))));
         }
     }
   }
   ```


-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to