Skip to content

Conversation

@alamb
Copy link

@alamb alamb commented Mar 17, 2025

Proposed addition to apache#15263 to reduce Schema clones

@alamb alamb changed the title Reduce Schema clones in predicate Reduce Schema clones in parquet row filter creation Mar 17, 2025
// `a = 1 AND b = 2 AND c = 3` -> [`a = 1`, `b = 2`, `c = 3`]
let predicates = split_conjunction(expr);

let file_schema = Arc::new(file_schema.clone());
Copy link
Author

Choose a reason for hiding this comment

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

these are deep clones (clone the entire Schema) where as with this PR only the Arc is cloned (ref count incremented)

Copy link
Member

Choose a reason for hiding this comment

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

Yup makes total sense, I was just cautious to update the signature for build_row_filter since it seems to be a public function.

@adriangb adriangb merged commit 57c5c46 into pydantic:fix-predicate-pushdown-sa Mar 17, 2025
27 checks passed
@alamb alamb deleted the alamb/less_clone branch March 17, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants