diff --git a/extensions/parquet/table/src/main/java/io/deephaven/parquet/table/ParquetTableWriter.java b/extensions/parquet/table/src/main/java/io/deephaven/parquet/table/ParquetTableWriter.java index a4ed97d63b4..e6b2291221d 100644 --- a/extensions/parquet/table/src/main/java/io/deephaven/parquet/table/ParquetTableWriter.java +++ b/extensions/parquet/table/src/main/java/io/deephaven/parquet/table/ParquetTableWriter.java @@ -148,7 +148,15 @@ static void write( tableInfoBuilder.addDataIndexes(DataIndexInfo.of( destDirPath.relativize(info.metadataFilePath.toPath()).toString(), info.parquetColumnNames)); - write(indexTable, indexTable.getDefinition(), writeInstructions, + final ParquetInstructions writeInstructionsToUse; + if (INDEX_ROW_SET_COLUMN_NAME.equals(dataIndex.rowSetColumnName())) { + writeInstructionsToUse = writeInstructions; + } else { + writeInstructionsToUse = new ParquetInstructions.Builder(writeInstructions) + .addColumnNameMapping(INDEX_ROW_SET_COLUMN_NAME, dataIndex.rowSetColumnName()) + .build(); + } + write(indexTable, indexTable.getDefinition(), writeInstructionsToUse, info.destFile.getAbsolutePath(), Collections.emptyMap(), TableInfo.builder()); } }