Skip to content

Commit

Permalink
Minor touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
malhotrashivam committed Mar 5, 2024
1 parent c174452 commit ab73df0
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,11 @@ public static void writeKeyValuePartitionedTable(@NotNull final Table sourceTabl
.map(ColumnDefinition::getName)
.toArray(String[]::new);
final PartitionedTable partitionedTable = sourceTable.partitionBy(partitioningColNames);
writeKeyValuePartitionedTable(partitionedTable, definition, destinationDir, baseName, writeInstructions);
final TableDefinition keyTableDefinition = TableDefinition.of(partitioningColumns);
final TableDefinition leafDefinition =
getNonKeyTableDefinition(Arrays.asList(partitioningColNames), definition);
writeKeyValuePartitionedTableImpl(partitionedTable, keyTableDefinition, leafDefinition, destinationDir,
baseName, writeInstructions);
}

/**
Expand Down Expand Up @@ -610,6 +614,16 @@ public static void writeKeyValuePartitionedTable(@NotNull final PartitionedTable
baseName, writeInstructions);
}

/**
* Write a partitioned table to disk in a key=value partitioning format with the already computed definition for the
* key table and leaf table.
* <p>
* Check {@link #writeKeyValuePartitionedTable(PartitionedTable, File, String, ParquetInstructions)},
* {@link #writeKeyValuePartitionedTable(PartitionedTable, TableDefinition, File, String, ParquetInstructions)},
* {@link #writeKeyValuePartitionedTable(PartitionedTable, File, String, ParquetInstructions)}}, or
* {@link #writeKeyValuePartitionedTable(PartitionedTable, TableDefinition, File, String, ParquetInstructions)} for
* more details.
*/
private static void writeKeyValuePartitionedTableImpl(@NotNull final PartitionedTable partitionedTable,
@NotNull final TableDefinition keyTableDefinition,
@NotNull final TableDefinition leafDefinition,
Expand Down

0 comments on commit ab73df0

Please sign in to comment.