Skip to content

Commit

Permalink
Rewording based on review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
malhotrashivam committed Jun 7, 2024
1 parent ad2170d commit 76a8baa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ private static Collection<List<String>> indexedColumnNames(@NotNull final Table
* Write out tables to disk. Data indexes to write are determined by those already present on the first source or
* those provided through {@link ParquetInstructions.Builder#addIndexColumns}. If all source tables have the same
* definition, this method will use the common definition for writing. Else, a definition must be provided through
* the write instructions.
* the {@code writeInstructions}.
*
* @param sources The tables to write
* @param destinations The destination paths or URIs. Any non-existing directories in the paths provided are
Expand All @@ -879,7 +879,7 @@ public static void writeTables(
for (int idx = 1; idx < sources.length; idx++) {
if (!firstDefinition.equals(sources[idx].getDefinition())) {
throw new IllegalArgumentException(
"Table definitions must be provided when writing multiple tables " +
"Table definition must be provided when writing multiple tables " +
"with different definitions");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,7 @@ public void writeMultiTableExceptionTest() {
}

@Test
public void writeMultiTableDefintionTest() {
public void writeMultiTableDefinitionTest() {
// Create an empty parent directory
final File parentDir = new File(rootFile, "tempDir");
parentDir.mkdir();
Expand Down
3 changes: 2 additions & 1 deletion py/server/tests/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,13 +746,14 @@ def test_v2_pages_helper(dh_table):
dh_table2 = self.get_table_with_array_data()
test_v2_pages_helper(dh_table2)

def test_batch_write_without_definition(self):
def test_batch_write_definition_handling(self):
table = empty_table(3).update(
formulas=["x=i", "y=(double)(i/10.0)", "z=(double)(i*i)"]
)
table2 = empty_table(3).update(
formulas=["x=i*2", "y=(double)(i/5.0)", "z=(double)(i*i*i)"]
)
# Should succeed because both tables have the same definition
batch_write([table, table2], ["X.parquet", "Y.parquet"])
self.assert_table_equals(read("X.parquet"), table)
self.assert_table_equals(read("Y.parquet"), table2)
Expand Down

0 comments on commit 76a8baa

Please sign in to comment.