KnightChess commented on code in PR #11650:
URL: https://github.com/apache/hudi/pull/11650#discussion_r1685468692
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/analysis/HoodieAnalysis.scala:
##########
@@ -428,6 +428,12 @@ case class ResolveImplementationsEarly() extends
Rule[LogicalPlan] {
if sparkAdapter.isHoodieTable(table) && ct.query.forall(_.resolved) =>
CreateHoodieTableAsSelectCommand(table, mode, query)
+ case ct: CreateTable =>
+ // NOTE: In case of CreateTable with schema and multiple partition
fields,
+ // we have to make sure that partition fields are ordered in the same
way as they are in the schema.
+ HoodieSchemaUtils.checkPartitionSchemaOrder(ct.tableDesc.schema,
ct.tableDesc.partitionColumnNames)
Review Comment:
like `df.saveAsTable` or `create table as select`, the tableDesc will not
have schema, may be need use query logical plan output
--
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]