GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — [adapters] Delta: let a filter name a nested column-mapped field by blp · Pull Request #7669 · feldera/feldera Conversation
|
| Read path | Before |
|---|---|
Snapshot, distributed: false (delta-rs provider) |
works |
Snapshot, distributed: true |
fails (the issue) |
| Follow, add/remove files | fails |
| Follow, change data feed | fails |
| CDC mode | fails |
project_physical_to_logical now also puts back nested names, through a scalar function (RelabelNestedUdf) that applies the existing relabel_array to each column that holds column-mapped nested fields. It is zero-copy and keeps struct nulls.
A predicate on a nested field cannot push down through the function, so it gets no row-group pruning. Before this change those predicates failed, so no pruning is lost.
cargo test -p dbsp_adapters --lib delta_table: 430 passed.cargo clippy -p dbsp_adapters --all-targets: clean.test_delta_input_column_mapping_nested_dist_filter for the distributed snapshot case. I have not run it locally; CI will.None.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@swanandx This is outside my expertise so I wasn't able to effectively review it myself. I think you know more about this. @anandbraman Does this make sense relative to the bug report? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
we can now remove the nested_map variable and the relabel_nested_columns(&batch, &nested_map) call in execute_df_inner as it shouldn't be required with this fix in place. RelabelNestedUdf already renames nested fields before the query runs, so that step no longer changes anything
also, we should rebase and Sign off the commit before merging
thank you so much for the fix!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # - "round-robin pre-split unpartitioned scans": reads a many-file table in | ||
| # parallel (#2042). `DELTA_SCAN_ROUND_ROBIN=false` turns it off. | ||
| # Upstream now, do not reapply: the delta-io/delta-rs#4692 backport. | ||
| deltalake = { git = "https://github.com/feldera/delta-rs.git", rev = "9d996253cc60e5a6f35b2be5aef1cce89e08d951" } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
why we changing this? rebase should solve this
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Right, that was an artifact of an old base. The branch is now rebased onto main as one signed-off commit, and it no longer touches Cargo.toml or Cargo.lock. That commit also drops the per-batch relabel_nested_columns call and nested_map from execute_df_inner, as you suggested. The delta_table tests pass.
(Claude, on behalf of @blp)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
0939660 to
b17f5af
Compare
When the connector reads Parquet files itself (distributed snapshot, follow, change data feed, CDC), it reads them with physical `col-<uuid>` names at every level. `project_physical_to_logical` put back only the top-level logical names, so a `filter`, `snapshot_filter`, `cdc_delete_filter`, or `cdc_order_by` that named a nested field failed with "Field ... not found in struct". The nested names were put back only per batch, after the query had run. `project_physical_to_logical` now also puts back nested names, through a scalar function that applies `relabel_array` to each column that holds column-mapped nested fields. This makes the per-batch relabel in `execute_df_inner` redundant, so it is gone. Fixes #7657. Signed-off-by: Ben Pfaff <[email protected]>
b17f5af to
e89cf5d
Compare
There was an error while loading. Please reload this page.
|
Verdict: PR bug, high confidence. The new test Evidence
Fix: renamed the test to Take it with: Compare: delta-nested-filter...fred/observe-7669-41500486043 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…me limit. Signed-off-by: Ben Pfaff <[email protected]>
|
Fixed in 45d6bb2: renamed the test to (Claude, on behalf of @blp) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[connectors] Delta: nested column filter fails when distributed is true
There was an error while loading. Please reload this page.