You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/01 14:14:18 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #37228: [SPARK-37980][SQL] Extend METADATA column to support row indexes

cloud-fan commented on code in PR #37228:
URL: https://github.com/apache/spark/pull/37228#discussion_r934581170


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormat.scala:
##########
@@ -220,10 +235,24 @@ object FileFormat {
           // the modificationTime from the file is in millisecond,
           // while internally, the TimestampType `file_modification_time` is stored in microsecond
           row.update(i, fileModificationTime * 1000L)
+        case ROW_INDEX =>
+          // Reserve the spot in the row for a LongType value. The metadata fields that have
+          // identical values for each row of the file are set by this function, while fields that
+          // have different values (such as row index) are set separately.
+          row.update(i, -1L)

Review Comment:
   when will we hit this default value of row index?



-- 
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