Skip to content

Commit

Permalink
Corrected OOB test failures due to Iceberg API table column renames. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lbooker42 committed Jun 25, 2024
1 parent 91d5df5 commit 8f312d1
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ public void testListNamespaces() {

final Table table = adapter.listNamespacesAsTable();
Assert.eq(table.size(), "table.size()", 2, "2 namespace in the catalog");
Assert.eqTrue(table.getColumnSource("namespace").getType().equals(String.class), "namespace column type");
Assert.eqTrue(table.getColumnSource("namespace_object").getType().equals(Namespace.class),
Assert.eqTrue(table.getColumnSource("Namespace").getType().equals(String.class), "namespace column type");
Assert.eqTrue(table.getColumnSource("NamespaceObject").getType().equals(Namespace.class),
"namespace_object column type");
}

Expand All @@ -138,9 +138,9 @@ public void testListTables() {

Table table = adapter.listTablesAsTable(ns);
Assert.eq(table.size(), "table.size()", 3, "3 tables in the namespace");
Assert.eqTrue(table.getColumnSource("namespace").getType().equals(String.class), "namespace column type");
Assert.eqTrue(table.getColumnSource("table_name").getType().equals(String.class), "table_name column type");
Assert.eqTrue(table.getColumnSource("table_identifier_object").getType().equals(TableIdentifier.class),
Assert.eqTrue(table.getColumnSource("Namespace").getType().equals(String.class), "namespace column type");
Assert.eqTrue(table.getColumnSource("TableName").getType().equals(String.class), "table_name column type");
Assert.eqTrue(table.getColumnSource("TableIdentifierObject").getType().equals(TableIdentifier.class),
"table_identifier_object column type");

// Test the string versions of the methods
Expand All @@ -166,11 +166,11 @@ public void testListSnapshots() {

Table table = adapter.listSnapshotsAsTable(tableIdentifier);
Assert.eq(table.size(), "table.size()", 4, "4 snapshots for sales/sales_multi");
Assert.eqTrue(table.getColumnSource("id").getType().equals(long.class), "id column type");
Assert.eqTrue(table.getColumnSource("timestamp_ms").getType().equals(long.class), "timestamp_ms column type");
Assert.eqTrue(table.getColumnSource("operation").getType().equals(String.class), "operation column type");
Assert.eqTrue(table.getColumnSource("summary").getType().equals(Map.class), "summary column type");
Assert.eqTrue(table.getColumnSource("snapshot_object").getType().equals(Snapshot.class),
Assert.eqTrue(table.getColumnSource("Id").getType().equals(long.class), "id column type");
Assert.eqTrue(table.getColumnSource("TimestampMs").getType().equals(long.class), "timestamp_ms column type");
Assert.eqTrue(table.getColumnSource("Operation").getType().equals(String.class), "operation column type");
Assert.eqTrue(table.getColumnSource("Summary").getType().equals(Map.class), "summary column type");
Assert.eqTrue(table.getColumnSource("SnapshotObject").getType().equals(Snapshot.class),
"snapshot_object column type");

// Test the string versions of the methods
Expand Down

0 comments on commit 8f312d1

Please sign in to comment.