luoyajun526 commented on a change in pull request #1720:
URL: https://github.com/apache/hudi/pull/1720#discussion_r439736633
##########
File path: hudi-spark/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala
##########
@@ -247,7 +247,13 @@ private[hudi] object HoodieSparkSqlWriter {
hiveSyncConfig.hivePass = parameters(HIVE_PASS_OPT_KEY)
hiveSyncConfig.jdbcUrl = parameters(HIVE_URL_OPT_KEY)
hiveSyncConfig.partitionFields =
-
ListBuffer(parameters(HIVE_PARTITION_FIELDS_OPT_KEY).split(",").map(_.trim).filter(!_.isEmpty).toList:
_*)
+ // Set partitionFields to empty, when the NonPartitionedExtractor is used
+ if
(classOf[NonPartitionedExtractor].getName.equals(parameters(HIVE_PARTITION_EXTRACTOR_CLASS_OPT_KEY)))
{
+ log.warn(s"Parameter '$HIVE_PARTITION_FIELDS_OPT_KEY' is ignored,
since the NonPartitionedExtractor is used")
+ Array.empty[String].toList
+ } else {
+
ListBuffer(parameters(HIVE_PARTITION_FIELDS_OPT_KEY).split(",").map(_.trim).filter(!_.isEmpty).toList:
_*)
+ }
Review comment:
Moved
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]