You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "edmondop (via GitHub)" <gi...@apache.org> on 2023/11/17 03:34:18 UTC
[PR] Wip [arrow-datafusion]
edmondop opened a new pull request, #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243
Addresses #8133
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wip [arrow-datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1398420385
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1887,11 +1887,13 @@ pub struct Filter {
pub predicate: Expr,
/// The incoming logical plan
pub input: Arc<LogicalPlan>,
+ // Selectivity
Review Comment:
I think it's beter to move this to the physical plan `FilterExec` only, so we don't have to pass it in logica plan.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1413159368
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -994,4 +1014,22 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_validation_filter_selectivity() -> Result<()> {
Review Comment:
Will try to finish it between today and tomorrow, thanks for the suggestion
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1405193295
##########
datafusion/common/src/config.rs:
##########
@@ -524,6 +524,11 @@ config_namespace! {
/// The maximum estimated size in bytes for one input side of a HashJoin
/// will be collected into a single partition
pub hash_join_single_partition_threshold: usize, default = 1024 * 1024
+
+ /// The default filter selectivity used by Filter Statistics
+ /// when an exact selectivity cannot be determined. Valid values are
+ /// between 0 (no selectivity) and 100 (all rows are selected).
+ pub default_filter_selectivity: u8, default = 20
Review Comment:
The two main reasons for choosing a uint are the lack of Eq trait implementation for f32, as well as the problem that could arise when serializing numbers that cannot be perfectly represented as f32. If you had already made this consideration and you think f32 is still a better option, let me know and I will proceed
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wip [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1396667822
##########
datafusion/optimizer/src/filter_null_join_keys.rs:
##########
@@ -74,13 +74,15 @@ impl OptimizerRule for FilterNullJoinKeys {
join.left = Arc::new(LogicalPlan::Filter(Filter::try_new(
predicate,
join.left.clone(),
+ 20,
Review Comment:
This seems a case where the optimizer doesn't really optimize an existing filter, but add a filter, so I think we can only default it
##########
datafusion/optimizer/src/filter_null_join_keys.rs:
##########
@@ -74,13 +74,15 @@ impl OptimizerRule for FilterNullJoinKeys {
join.left = Arc::new(LogicalPlan::Filter(Filter::try_new(
predicate,
join.left.clone(),
+ 20,
)?));
}
if !right_filters.is_empty() {
let predicate = create_not_null_predicate(right_filters);
join.right = Arc::new(LogicalPlan::Filter(Filter::try_new(
predicate,
join.right.clone(),
+ 20,
Review Comment:
This seems a case where the optimizer doesn't really optimize an existing filter, but add a filter, so I think we can only default it
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wip [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#issuecomment-1815701398
@andygrove I do have a super early draft broken implementation, but it's already enough to ask your view on what's the right thing to do with SQL and when the filter is introduced as a part of an optimization but not as an optimization of an existing filter. Could you please review my comments?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wip [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1396667635
##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -493,13 +493,13 @@ fn push_down_all_join(
let left = match conjunction(left_push) {
Some(predicate) => {
- LogicalPlan::Filter(Filter::try_new(predicate, Arc::new(left.clone()))?)
+ LogicalPlan::Filter(Filter::try_new(predicate, Arc::new(left.clone()),20)?)
}
None => left.clone(),
};
let right = match conjunction(right_push) {
Some(predicate) => {
- LogicalPlan::Filter(Filter::try_new(predicate, Arc::new(right.clone()))?)
+ LogicalPlan::Filter(Filter::try_new(predicate, Arc::new(right.clone()),20)?)
Review Comment:
Unclear how to handle this case
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#issuecomment-1826272139
Overall looks very good! I think it might make more sense to use a `f32` for this :)
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1412563817
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -994,4 +1014,22 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_validation_filter_selectivity() -> Result<()> {
Review Comment:
I think you should be able to look at the output of `FilterExec::statistics()` and the row number estimates will change with different value of selectivity
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wip [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1396668372
##########
datafusion/core/src/datasource/view.rs:
##########
@@ -113,7 +113,7 @@ impl TableProvider for ViewTable {
let mut plan = LogicalPlanBuilder::from(plan);
if let Some(filter) = filter {
- plan = plan.filter(filter)?;
+ plan = plan.filter(filter, 20)?;
Review Comment:
Unclear how to handle it here
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wip [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1396668034
##########
datafusion/optimizer/src/decorrelate.rs:
##########
@@ -148,7 +148,7 @@ impl TreeNodeRewriter for PullUpCorrelatedExpr {
let mut plan =
LogicalPlanBuilder::from((*plan_filter.input).clone());
if let Some(expr) = conjunction(subquery_filters) {
- plan = plan.filter(expr)?
+ plan = plan.filter(expr, 20)?
Review Comment:
This seems a case where the optimizer doesn't really optimize an existing filter, but add a filter, so I think we can only default it
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wip [arrow-datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1398420385
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1887,11 +1887,13 @@ pub struct Filter {
pub predicate: Expr,
/// The incoming logical plan
pub input: Arc<LogicalPlan>,
+ // Selectivity
Review Comment:
I think it's beter to move this to the physical plan `FilterExec` only, so we don't have to pass it in logical plan.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1414205510
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -994,4 +1014,22 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_validation_filter_selectivity() -> Result<()> {
Review Comment:
Not sure however how [this](https://github.com/apache/arrow-datafusion/blob/main/datafusion/physical-plan/src/filter.rs#L221) should be handled
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wip [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1396666900
##########
datafusion/substrait/src/logical_plan/consumer.rs:
##########
@@ -266,7 +266,7 @@ pub async fn from_substrait_rel(
if let Some(condition) = filter.condition.as_ref() {
let expr =
from_substrait_rex(condition, input.schema(), extensions).await?;
- input.filter(expr.as_ref().clone())?.build()
+ input.filter(expr.as_ref().clone(), 20)?.build()
Review Comment:
Not clear how to handle this
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1404831086
##########
datafusion/common/src/config.rs:
##########
@@ -524,6 +524,11 @@ config_namespace! {
/// The maximum estimated size in bytes for one input side of a HashJoin
/// will be collected into a single partition
pub hash_join_single_partition_threshold: usize, default = 1024 * 1024
+
+ /// The default filter selectivity used by Filter Statistics
+ /// when an exact selectivity cannot be determined. Valid values are
+ /// between 0 (no selectivity) and 100 (all rows are selected).
+ pub default_filter_selectivity: u8, default = 20
Review Comment:
I think it makes sense to make this a float (`0.2`).
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1412505974
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -994,4 +1014,22 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_validation_filter_selectivity() -> Result<()> {
Review Comment:
Shall we also add a test showing that changing the default selectivity actually affects the output statistics?
I think if the selectivity got hard coded to 0.2 again, no tests would fail 🤔 Maybe we could add another unit tests here setting selectivity to `0.5` or something and demonstrating the statistics are different
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -994,4 +1014,22 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_validation_filter_selectivity() -> Result<()> {
Review Comment:
Shall we also add a test showing that changing the default selectivity actually affects the output statistics?
I think if the selectivity got hard coded to 0.2 again, no tests would fail 🤔 Maybe we could add another unit tests here setting selectivity to `0.5` or something and demonstrating the statistics are different
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#issuecomment-1836602774
FYI @alamb @andygrove
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1412526748
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -994,4 +1014,22 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_validation_filter_selectivity() -> Result<()> {
Review Comment:
I agree we should, however I didn't know how to observe the effect of such a parameter. Is there some form of observable state or result exposed that I can use to perform an assertion about what selectivity has been used ?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1414200703
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -994,4 +1014,22 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_validation_filter_selectivity() -> Result<()> {
Review Comment:
@alamb fixed with https://github.com/apache/arrow-datafusion/pull/8243/commits/81034c209128b0046f464a40a5245de9c53861f5
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make filter selectivity for statistics configurable [arrow-datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1414535729
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -994,4 +1014,22 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_validation_filter_selectivity() -> Result<()> {
Review Comment:
> Not sure however how [this](https://github.com/apache/arrow-datafusion/blob/main/datafusion/physical-plan/src/filter.rs#L221) should be handled
That code will be invoked for 'complicated' predicates -- maybe we could fake it with something like `sin(x) = 4.0`.
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -994,4 +1014,54 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_validation_filter_selectivity() -> Result<()> {
+ let schema = Schema::new(vec![Field::new("a", DataType::Int32, false)]);
+ let input = Arc::new(StatisticsExec::new(
+ Statistics::new_unknown(&schema),
+ schema,
+ ));
+ // WHERE a = 10
+ let predicate = Arc::new(BinaryExpr::new(
+ Arc::new(Column::new("a", 0)),
+ Operator::Eq,
+ Arc::new(Literal::new(ScalarValue::Int32(Some(10)))),
+ ));
+ let filter = FilterExec::try_new(predicate, input)?;
+ assert!(filter.with_default_selectivity(120).is_err());
+ Ok(())
+ }
+
+ #[tokio::test]
+ async fn test_custom_filter_selectivity() -> Result<()> {
+ // Need a decimal to trigger inexact selectivity
+ let schema =
+ Schema::new(vec![Field::new("a", DataType::Decimal128(2, 3), false)]);
+ let input = Arc::new(StatisticsExec::new(
+ Statistics {
+ num_rows: Precision::Inexact(1000),
+ total_byte_size: Precision::Inexact(4000),
+ column_statistics: vec![ColumnStatistics {
+ ..Default::default()
+ }],
+ },
+ schema,
+ ));
+ // WHERE a = 10
+ let predicate = Arc::new(BinaryExpr::new(
+ Arc::new(Column::new("a", 0)),
+ Operator::Eq,
+ Arc::new(Literal::new(ScalarValue::Decimal128(Some(10), 10, 10))),
+ ));
+ let filter = FilterExec::try_new(predicate, input)?;
+ let statistics = filter.statistics()?;
+ assert_eq!(statistics.num_rows, Precision::Inexact(200));
Review Comment:
👌 very nice
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -994,4 +1014,54 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_validation_filter_selectivity() -> Result<()> {
+ let schema = Schema::new(vec![Field::new("a", DataType::Int32, false)]);
+ let input = Arc::new(StatisticsExec::new(
+ Statistics::new_unknown(&schema),
+ schema,
+ ));
+ // WHERE a = 10
+ let predicate = Arc::new(BinaryExpr::new(
+ Arc::new(Column::new("a", 0)),
+ Operator::Eq,
+ Arc::new(Literal::new(ScalarValue::Int32(Some(10)))),
+ ));
+ let filter = FilterExec::try_new(predicate, input)?;
+ assert!(filter.with_default_selectivity(120).is_err());
+ Ok(())
+ }
+
+ #[tokio::test]
+ async fn test_custom_filter_selectivity() -> Result<()> {
+ // Need a decimal to trigger inexact selectivity
+ let schema =
+ Schema::new(vec![Field::new("a", DataType::Decimal128(2, 3), false)]);
+ let input = Arc::new(StatisticsExec::new(
+ Statistics {
+ num_rows: Precision::Inexact(1000),
+ total_byte_size: Precision::Inexact(4000),
+ column_statistics: vec![ColumnStatistics {
+ ..Default::default()
+ }],
+ },
+ schema,
+ ));
+ // WHERE a = 10
+ let predicate = Arc::new(BinaryExpr::new(
+ Arc::new(Column::new("a", 0)),
+ Operator::Eq,
+ Arc::new(Literal::new(ScalarValue::Decimal128(Some(10), 10, 10))),
+ ));
+ let filter = FilterExec::try_new(predicate, input)?;
+ let statistics = filter.statistics()?;
+ assert_eq!(statistics.num_rows, Precision::Inexact(200));
Review Comment:
👌 very nice
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wip [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1396667105
##########
datafusion/sql/src/select.rs:
##########
@@ -311,6 +311,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
Ok(LogicalPlan::Filter(Filter::try_new(
filter_expr,
Arc::new(plan),
+ 20,
Review Comment:
Probably reading from SQL context is the right thing to do here? i.e. a variable?
##########
datafusion/sql/src/select.rs:
##########
@@ -202,7 +202,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
let plan = if let Some(having_expr_post_aggr) = having_expr_post_aggr {
LogicalPlanBuilder::from(plan)
- .filter(having_expr_post_aggr)?
+ .filter(having_expr_post_aggr, 20)?
Review Comment:
Probably reading from SQL context is the right thing to do here? i.e. a variable?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wip [arrow-datafusion]
Posted by "edmondop (via GitHub)" <gi...@apache.org>.
edmondop commented on code in PR #8243:
URL: https://github.com/apache/arrow-datafusion/pull/8243#discussion_r1396666791
##########
datafusion/sql/src/statement.rs:
##########
@@ -950,7 +950,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
&[&[&schema]],
&[using_columns],
)?;
- LogicalPlan::Filter(Filter::try_new(filter_expr, Arc::new(scan))?)
+ LogicalPlan::Filter(Filter::try_new(filter_expr, Arc::new(scan), 20)?)
Review Comment:
Probably reading from SQL context is the right thing to do here?
##########
datafusion/sql/src/statement.rs:
##########
@@ -1020,7 +1020,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
&[&[scan.schema()]],
&[using_columns],
)?;
- LogicalPlan::Filter(Filter::try_new(filter_expr, Arc::new(scan))?)
+ LogicalPlan::Filter(Filter::try_new(filter_expr, Arc::new(scan),20)?)
Review Comment:
Probably reading from SQL context is the right thing to do here?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org