You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "Yaohua628 (via GitHub)" <gi...@apache.org> on 2023/02/16 01:59:41 UTC

[GitHub] [spark] Yaohua628 commented on a diff in pull request #40035: [SPARK-41151][FOLLOW-UP][SQL] Improve the doc of `_metadata` generated columns nullability implementation

Yaohua628 commented on code in PR #40035:
URL: https://github.com/apache/spark/pull/40035#discussion_r1107928238


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala:
##########
@@ -578,6 +578,11 @@ object FileSourceGeneratedMetadataAttribute {
 
   val FILE_SOURCE_GENERATED_METADATA_COL_ATTR_KEY = "__file_source_generated_metadata_col"
 
+  // We keep generated metadata attributes nullability configurable here:
+  // 1. Before passing to readers, we create generated metadata attributes as nullable;
+  //    Because, for row_index, the readers do not consider the column required.
+  // 2. When applying the projection, we change the nullability back to not-nullable;
+  // See [[FileSourceStrategy.scala]] for more information

Review Comment:
   Thanks! Addressed



-- 
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-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org