Skip to content

Conversation

@lbooker42
Copy link
Contributor

@lbooker42 lbooker42 commented Aug 1, 2024

Will close #5868 when merged (but needs reconciled with #5880)

@lbooker42 lbooker42 added this to the 0.36.0 milestone Aug 1, 2024
@lbooker42 lbooker42 self-assigned this Aug 1, 2024
// Map all the column names in the schema to their legalized names.
final Map<String, String> legalizedColumnRenames = new HashMap<>();

// Validate user-supplied names meet legalization instructions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Validate user-supplied names meet legalization instructions
// Validate user-supplied names meet legalization rules

* @param instructions The instructions for customizations while reading
* @return The table definition as a Deephaven table
*/
@SuppressWarnings("unused")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we want @ScriptAPI annotations for this stuff?

final String destinationName = entry.getValue();
if (!NameValidator.isValidColumnName(destinationName)) {
throw new TableDataException(
String.format("%s - invalid column name provided (%s)", table, destinationName));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are losing the snapshotId that we had previously; we could still pass snapshotId, and have it be -1 when there is no snapshot, or something.

Comment on lines +721 to +722
uploadParquetFiles(new File(IcebergToolsTest.class.getResource("/warehouse/sales/sales_multi").getPath()),
warehousePath);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to upload parquet files to get the definition? I think it's all involved in the metadata (which we aren't uploading as part of this).

Comment on lines +734 to +738
tableDef.checkHasColumn("Region", String.class);
tableDef.checkHasColumn("Item_Type", String.class);
tableDef.checkHasColumn("Units_Sold", int.class);
tableDef.checkHasColumn("Unit_Price", double.class);
tableDef.checkHasColumn("Order_Date", Instant.class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should prefer to model this as

TableDefinition expected = ...;
TableDefinition actual = adapter.getTableDefinition(...);
assertEquals(expected, actual);

or something like that

@devinrsmith
Copy link
Member

Completed via #5891

@devinrsmith devinrsmith closed this Aug 6, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iceberg TableDefinition from table identifier

3 participants