Re: [PR] fix: aggregation corner case [datafusion]

2025-04-05 Thread via GitHub
jayzhan211 commented on code in PR #15457: URL: https://github.com/apache/datafusion/pull/15457#discussion_r2026221040 ## datafusion/functions-table/src/generate_series.rs: ## @@ -138,12 +138,15 @@ impl TableProvider for GenerateSeriesTable { async fn scan( &self,

Re: [PR] fix: aggregation corner case [datafusion]

2025-04-02 Thread via GitHub
jayzhan211 merged PR #15457: URL: https://github.com/apache/datafusion/pull/15457 -- 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-unsubscr...@dat

Re: [PR] fix: aggregation corner case [datafusion]

2025-04-02 Thread via GitHub
chenkovsky commented on PR #15457: URL: https://github.com/apache/datafusion/pull/15457#issuecomment-2774229631 I found that in the following sql. ``` create table t(i integer); SELECT count(*) FROM (select count(*) from t); ``` for the outer aggregation, both logica

Re: [PR] fix: aggregation corner case [datafusion]

2025-04-02 Thread via GitHub
chenkovsky commented on PR #15457: URL: https://github.com/apache/datafusion/pull/15457#issuecomment-2774494584 @jayzhan211 could you please review it again? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL abov

Re: [PR] fix: aggregation corner case [datafusion]

2025-03-29 Thread via GitHub
jayzhan211 commented on PR #15457: URL: https://github.com/apache/datafusion/pull/15457#issuecomment-2764347664 > > > count(*) actually doesnt depend on any column on input logically > > > > > > count(*) need to know the row number of the column, and it doesn't make sense to count

Re: [PR] fix: aggregation corner case [datafusion]

2025-03-29 Thread via GitHub
chenkovsky commented on PR #15457: URL: https://github.com/apache/datafusion/pull/15457#issuecomment-2763209390 > > count(*) actually doesnt depend on any column on input logically > > count(*) need to know the row number of the column, and it doesn't make sense to count all on "empty

Re: [PR] fix: aggregation corner case [datafusion]

2025-03-28 Thread via GitHub
jayzhan211 commented on PR #15457: URL: https://github.com/apache/datafusion/pull/15457#issuecomment-2763109194 > count(*) actually doesnt depend on any column on input logically count(*) need to know the row number of the column -- This is an automated message from the Apache Git S

Re: [PR] fix: aggregation corner case [datafusion]

2025-03-27 Thread via GitHub
chenkovsky commented on PR #15457: URL: https://github.com/apache/datafusion/pull/15457#issuecomment-2759908753 > but why don't we have "value" column in logical plan schema it's also an alternative solution. but i think that count(*) actually doesnt depends on any column on input log

Re: [PR] fix: aggregation corner case [datafusion]

2025-03-27 Thread via GitHub
jayzhan211 commented on PR #15457: URL: https://github.com/apache/datafusion/pull/15457#issuecomment-2759900781 but why don't we have "value" column in logical plan schema -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and us

Re: [PR] fix: aggregation corner case [datafusion]

2025-03-27 Thread via GitHub
jayzhan211 commented on PR #15457: URL: https://github.com/apache/datafusion/pull/15457#issuecomment-2759897290 Looks correct ``` query TT explain with test AS (SELECT i as needle FROM generate_series(1, 10) t(i)) select count(*) from test WHERE 1 = 1; logical_plan

[PR] fix: aggregation corner case [datafusion]

2025-03-27 Thread via GitHub
chenkovsky opened a new pull request, #15457: URL: https://github.com/apache/datafusion/pull/15457 ## Which issue does this PR close? - Closes #15386 . ## Rationale for this change for sql ``` with test AS (SELECT i as needle FROM generate_series(1, 10) t(i))