Skip to content
Merged
Show file tree
Hide file tree
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 @@ -1722,13 +1722,13 @@ public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(C

TupleDomain<IcebergColumnHandle> remainingConstraint = constraint.getSummary()
.transformKeys(IcebergColumnHandle.class::cast)
.filter(isIdentityPartition.negate())
.filter(isMetadataColumn.negate());
.filter(isIdentityPartition.negate());

TupleDomain<IcebergColumnHandle> newUnenforcedConstraint = remainingConstraint
// TODO: Remove after completing https://github.com/trinodb/trino/issues/8759
// Only applies to the unenforced constraint because structural types cannot be partition keys
.filter((columnHandle, predicate) -> !isStructuralType(columnHandle.getType()))
.filter(isMetadataColumn.negate())
.intersect(table.getUnenforcedPredicate());

if (newEnforcedConstraint.equals(table.getEnforcedPredicate())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3291,6 +3291,12 @@ public void testPathHiddenColumn()
assertThat(query("SELECT file_path FROM \"" + tableName + "$files\""))
.matches("SELECT DISTINCT \"$path\" as file_path FROM " + tableName);

String somePath = (String) computeScalar("SELECT \"$path\" FROM " + tableName + " WHERE userid = 2");
assertThat(query("SELECT userid FROM " + tableName + " WHERE \"$path\" = '" + somePath + "'"))
.matches("VALUES 2, 5");
assertThat(query("SELECT userid FROM " + tableName + " WHERE \"$path\" = '" + somePath + "' AND userid > 0"))
.matches("VALUES 2, 5");
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The first one was passing, but this one was failing.


assertUpdate("DROP TABLE " + tableName);
}

Expand Down