cloud-fan commented on code in PR #40300: URL: https://github.com/apache/spark/pull/40300#discussion_r1127307622
########## sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala: ########## @@ -2714,6 +2726,17 @@ class Dataset[T] private[sql]( */ def withColumn(colName: String, col: Column): DataFrame = withColumns(Seq(colName), Seq(col)) + /** + * Returns a new Dataset by selecting a metadata column with the given logical name. + * + * A metadata column can be accessed this way even if the underlying data source defines a data + * column with a conflicting name. + * + * @group untypedrel + * @since 4.0.0 + */ + def withMetadataColumn(colName: String): DataFrame = withColumn(colName, metadataColumn(colName)) Review Comment: This is a weird API as there is no `withColumn` function that takes only a string parameter. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org