amrishlal commented on code in PR #8879:
URL: https://github.com/apache/hudi/pull/8879#discussion_r1224607818
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/DefaultSource.scala:
##########
@@ -144,20 +144,25 @@ class DefaultSource extends RelationProvider
mode: SaveMode,
optParams: Map[String, String],
df: DataFrame): BaseRelation = {
- val dfWithoutMetaCols =
df.drop(HoodieRecord.HOODIE_META_COLUMNS.asScala:_*)
+ val dfPrepped = if (optParams.getOrDefault(DATASOURCE_WRITE_PREPPED_KEY,
"false")
+ .equalsIgnoreCase("true")) {
+ df // Don't remove meta columns for prepped write.
+ } else {
+ df.drop(HoodieRecord.HOODIE_META_COLUMNS.asScala: _*)
Review Comment:
From what I can see, DataFrame.drop is a
[no-op](https://learn.microsoft.com/en-us/dotnet/api/microsoft.spark.sql.dataframe.drop?view=spark-dotnet)
if the column doesn't exist.
--
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]