-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fail to execute Iceberg time travel query #13613
Comments
After stepping into the code, I find that the schema is null after this line: trino/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java Line 329 in bfb1c63
Our team use Spark with Iceberg lib version of 0.12 and it may not support to write And I notice that in Iceberg code comment, the schema id can be
Should we use current schema when |
Current Iceberg community solution to null public static Schema schemaFor(Table table, long snapshotId) {
Snapshot snapshot = table.snapshot(snapshotId);
Preconditions.checkArgument(snapshot != null, "Cannot find snapshot with ID %s", snapshotId);
Integer schemaId = snapshot.schemaId();
// schemaId could be null, if snapshot was created before Iceberg added schema id to snapshot
if (schemaId != null) {
Schema schema = table.schemas().get(schemaId);
Preconditions.checkState(schema != null, "Cannot find schema with schema id %s", schemaId);
return schema;
}
// TODO: recover the schema by reading previous metadata files
return table.schema();
} |
After update Trino version to 392, queries failed for time travel queries.
Stacktrace:
The text was updated successfully, but these errors were encountered: