Skip to content

Commit f0c5676

Browse files
sezrubyEunjin Song (from Dev Box)
authored andcommitted
add row index column only
1 parent 69c9545 commit f0c5676

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spark/src/main/scala/org/apache/spark/sql/delta/PreprocessTableWithDVs.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,12 @@ object ScanWithDeletionVectors {
147147
case o => o
148148
}
149149
} else {
150-
inputScan.output :+ fileFormat.createFileMetadataCol()
150+
val metadataAttr = fileFormat.createFileMetadataCol()
151+
val rowIndexOnlyDataType =
152+
metadataAttr.dataType.asInstanceOf[StructType].apply(Set(ParquetFileFormat.ROW_INDEX))
153+
inputScan.output :+ metadataAttr.copy(
154+
dataType = rowIndexOnlyDataType)(
155+
exprId = metadataAttr.exprId, qualifier = metadataAttr.qualifier)
151156
}
152157
} else {
153158
inputScan.output

0 commit comments

Comments
 (0)