Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct OOB test failures from mismatching Iceberg API table column names #5662

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading