Skip to content

Add LAG window function #772

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

Merged
merged 1 commit into from
Apr 13, 2025
Merged

Add LAG window function #772

merged 1 commit into from
Apr 13, 2025

Conversation

Ulimo
Copy link
Contributor

@Ulimo Ulimo commented Apr 13, 2025

This fixes #769

@Ulimo Ulimo requested a review from Copilot April 13, 2025 18:04
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/FlowtideDotNet.Substrait/Sql/Internal/BuiltInSqlFunctions.cs:970

  • [nitpick] Consider rewording the error message thrown here to 'lag requires at least one argument and cannot be a wildcard' for improved clarity.
if (argList.Args == null || argList.Args.Count < 1)

src/FlowtideDotNet.Substrait/Sql/Internal/BuiltInSqlFunctions.cs:974

  • [nitpick] Consider updating the error message to clearly state that a wildcard argument is not permitted for lag; this will aid in debugging.
if ((argList.Args[0] is FunctionArg.Unnamed unnamed0 && unnamed0.FunctionArgExpression is FunctionArgExpression.Wildcard))

Copy link
Contributor

@github-actions github-actions bot left a 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: 50102f3 Previous: 22d4209 Ratio
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.InnerJoin 409783200 ns (± 6364744.931260011) 458826533.3333333 ns (± 10640413.19005047) 0.89
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.LeftJoin 514421750 ns (± 26031329.902905248) 564994640 ns (± 28550338.329818636) 0.91
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ProjectionAndNormalization 148660140 ns (± 5302674.420296486) 169842820 ns (± 7144067.768715523) 0.88
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.SumAggregation 153088630 ns (± 17961706.650464296) 171581250 ns (± 12415362.812660772) 0.89
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ListAggWithMapAggregation 1838919370 ns (± 95276724.66238132) 1982296640 ns (± 123349811.75190067) 0.93
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.WindowSum 360495483.3333333 ns (± 17292831.922071062)
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ListAggWithStructAggregation 1458525580 ns (± 95911366.25078848)

This comment was automatically generated by workflow using github-action-benchmark.

@Ulimo Ulimo merged commit 8361dcb into main Apr 13, 2025
7 checks passed
@Ulimo Ulimo deleted the lag_window_function branch April 13, 2025 18:31
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.

Add support for LAG window function
1 participant