alamb commented on code in PR #14182:
URL: https://github.com/apache/datafusion/pull/14182#discussion_r1921109373
##########
datafusion/physical-plan/src/joins/join_filter.rs:
##########
@@ -30,15 +30,15 @@ pub struct JoinFilter {
/// Column indices required to construct intermediate batch for filtering
pub(crate) column_indices: Vec<ColumnIndex>,
/// Physical schema of intermediate batch
- pub(crate) schema: Schema,
+ pub(crate) schema: Arc<Schema>,
}
impl JoinFilter {
/// Creates new JoinFilter
pub fn new(
expression: Arc<dyn PhysicalExpr>,
column_indices: Vec<ColumnIndex>,
- schema: Schema,
+ schema: Arc<Schema>,
Review Comment:
```suggestion
schema: SchemaRef,
```
##########
datafusion/physical-plan/src/joins/join_filter.rs:
##########
@@ -30,15 +30,15 @@ pub struct JoinFilter {
/// Column indices required to construct intermediate batch for filtering
pub(crate) column_indices: Vec<ColumnIndex>,
/// Physical schema of intermediate batch
- pub(crate) schema: Schema,
+ pub(crate) schema: Arc<Schema>,
Review Comment:
I think this is more commonly referred to as `SchemaRef` (it is the same
thing internally)
```suggestion
pub(crate) schema: SchemaRef,
```
##########
datafusion/core/src/physical_optimizer/projection_pushdown.rs:
##########
@@ -1255,7 +1255,7 @@ fn update_join_filter(
side: col_idx.side,
})
.collect(),
- join_filter.schema().clone(),
+ Arc::<arrow_schema::Schema>::clone(join_filter.schema()),
Review Comment:
I think this can be written more concisely like
```suggestion
Arc::clone(join_filter.schema()),
```
##########
datafusion/physical-plan/src/joins/join_filter.rs:
##########
@@ -76,7 +76,7 @@ impl JoinFilter {
}
/// Intermediate batch schema
- pub fn schema(&self) -> &Schema {
+ pub fn schema(&self) -> &Arc<Schema> {
Review Comment:
```suggestion
pub fn schema(&self) -> &SchemaRef {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]