amogh-jahagirdar commented on code in PR #12736:
URL: https://github.com/apache/iceberg/pull/12736#discussion_r2040528348
##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/data/SparkParquetWriters.java:
##########
@@ -557,14 +559,39 @@ public Map.Entry<K, V> next() {
private static class InternalRowWriter extends
ParquetValueWriters.StructWriter<InternalRow> {
private final DataType[] types;
+ private final Integer[] rowLineageAttributeIndices = {null, null};
private InternalRowWriter(List<ParquetValueWriter<?>> writers,
List<DataType> types) {
super(writers);
+ int writerIndex = 0;
+ for (ParquetValueWriter<?> writer : writers) {
+ if (writer.columns().size() == 1 && writer.columns().get(0) instanceof
ColumnWriter) {
+ ColumnWriter<?> columnWriter = (ColumnWriter<?>)
writer.columns().get(0);
+ if (columnWriter.desc().getPrimitiveType().getId().intValue()
+ == MetadataColumns.ROW_ID.fieldId()) {
+ rowLineageAttributeIndices[0] = writerIndex;
+ }
+ if (columnWriter.desc().getPrimitiveType().getId().intValue()
+ == MetadataColumns.LAST_UPDATED_SEQUENCE_NUMBER.fieldId()) {
+ rowLineageAttributeIndices[1] = writerIndex;
+ }
+ writerIndex++;
Review Comment:
Not needed, I was trying something.....
--
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]