-
Notifications
You must be signed in to change notification settings - Fork 4
Fix so window functions are run before any where statement #758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This allows using window functions in the where statement for filtering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
Benchmark suite | Current: 01e3290 | Previous: 22d4209 | Ratio |
---|---|---|---|
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.InnerJoin |
402028500 ns (± 5153287.315151368 ) |
458826533.3333333 ns (± 10640413.19005047 ) |
0.88 |
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.LeftJoin |
494493100 ns (± 23456714.6544912 ) |
564994640 ns (± 28550338.329818636 ) |
0.88 |
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ProjectionAndNormalization |
153231730 ns (± 11859188.990239687 ) |
169842820 ns (± 7144067.768715523 ) |
0.90 |
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.SumAggregation |
159438294.44444445 ns (± 7053451.4679182265 ) |
171581250 ns (± 12415362.812660772 ) |
0.93 |
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ListAggWithMapAggregation |
1808789850 ns (± 64070904.465968184 ) |
1982296640 ns (± 123349811.75190067 ) |
0.91 |
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.WindowSum |
365323210 ns (± 12760915.101934414 ) |
This comment was automatically generated by workflow using github-action-benchmark.
…ojection This is required since the filter removes row
The where filter changes the window, so they must be seperate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tests/FlowtideDotNet.AcceptanceTests/WindowFunctionTests.cs:708
- [nitpick] There is an inconsistency in the naming of RowNumberResult properties: earlier properties are accessed using PascalCase (e.g. CompanyId, UserKey) but later referenced in lowercase (e.g. value, userkey, companyId). Consider using consistent naming conventions throughout the test to improve clarity.
.Where(x => x.value == 1)
src/FlowtideDotNet.Substrait/Sql/Internal/SqlSubstraitVisitor.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
tests/FlowtideDotNet.AcceptanceTests/WindowFunctionTests.cs:708
- [nitpick] Ensure consistent property naming for RowNumberResult fields; the test uses 'value' in one place and 'userkey'/'companyId' in another, which may reflect an inconsistency in property casing.
.Where(x => x.value == 1)
This allows using window functions in the where statement for filtering.