Skip to content

Fix for integer column InsertFrom#1108

Merged
Ulimo merged 3 commits intomainfrom
integer_inesrtfrom_performance
Apr 18, 2026
Merged

Fix for integer column InsertFrom#1108
Ulimo merged 3 commits intomainfrom
integer_inesrtfrom_performance

Conversation

@Ulimo
Copy link
Copy Markdown
Contributor

@Ulimo Ulimo commented Apr 18, 2026

Fix so it does not fallback to insertAt for a new column, it tries to widen if it can early to allow usage of InsertFrom method to get performance increase.

Fix so it does not fallback to insertAt for a new column, it tries to widen if it can early to allow usage of InsertFrom method to get performance increase.
Copilot AI review requested due to automatic review settings April 18, 2026 21:24
Copy link
Copy Markdown
Contributor

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.

Pull request overview

This PR improves IntegerColumn.InsertFrom behavior so that inserting into a new/empty integer column can widen the backing storage up-front (instead of falling back to per-element InsertAt), enabling the fast bulk InsertFrom path for better performance.

Changes:

  • Added WidenToBitWidth(int targetBitWidth) helper to create/upgrade _data to a specific integer bit width.
  • Updated IntegerColumn.InsertFrom to widen _data to the source column’s bit width when needed, then use _data.InsertFrom(...) where possible.
  • Retained a per-element InsertAt fallback when the target column is already wider than the source.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/FlowtideDotNet.Core/ColumnStore/DataColumns/IntegerColumn.cs
Comment thread src/FlowtideDotNet.Core/ColumnStore/DataColumns/IntegerColumn.cs Outdated
Comment thread src/FlowtideDotNet.Core/ColumnStore/DataColumns/IntegerColumn.cs
Comment thread src/FlowtideDotNet.Core/ColumnStore/DataColumns/IntegerColumn.cs
Ulimo and others added 2 commits April 18, 2026 23:29
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
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

Details
Benchmark suite Current: 95d7a7c Previous: 859330d Ratio
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.InnerJoin 247822980 ns (± 7631222.986855457) 307785430 ns (± 9897277.576973714) 0.81
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.LeftJoin 354946455.5555556 ns (± 8563566.613437288) 461337240 ns (± 19940786.10567074) 0.77
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ProjectionAndNormalization 86386230 ns (± 8191863.148922024) 125533570 ns (± 10748358.533159066) 0.69
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.SumAggregation 90700170 ns (± 8083875.481860307) 138528520 ns (± 8580649.062577441) 0.65
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ListAggWithMapAggregation 1580879811.1111112 ns (± 110911654.86823787) 1823440280 ns (± 56615189.59691922) 0.87
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.WindowSum 319136730 ns (± 30364692.09269213) 359591925 ns (± 5946342.432057349) 0.89
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ListAggWithStructAggregation 1373551750 ns (± 95322866.55643602) 1507727890 ns (± 61734781.22500134) 0.91

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

@Ulimo Ulimo merged commit ba54cce into main Apr 18, 2026
10 checks passed
@Ulimo Ulimo deleted the integer_inesrtfrom_performance branch April 18, 2026 21:46
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.

2 participants