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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala:
##########
@@ -578,6 +578,13 @@ 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.

Review Comment:
   It can be null in the process so to say (column is generated with nulls 
which are then replaced), but it will not be null in the returned 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to