Skip to content

Separate positional from by name cast#7503

Open
robert3005 wants to merge 4 commits intodevelopfrom
rk/castopts
Open

Separate positional from by name cast#7503
robert3005 wants to merge 4 commits intodevelopfrom
rk/castopts

Conversation

@robert3005
Copy link
Copy Markdown
Contributor

@robert3005 robert3005 commented Apr 16, 2026

In order to handle full generality of casts we need to distinguish between
casting fields by name and by position. The positional casts are useful for non
sql systems where names are just metadata and the order of values matters.
However, in order to integrate with sql systesm we need by names casts as well.
It's not possible to handle them without any indication from the user which
behaviour they care about

fix #6900

Signed-off-by: Robert Kruszewski github@robertk.io

@robert3005 robert3005 added the changelog/fix A bug fix label Apr 16, 2026
Comment thread vortex-proto/src/generated/vortex.expr.rs
Comment thread vortex-array/src/scalar_fn/fns/cast/mod.rs Outdated
@robert3005
Copy link
Copy Markdown
Contributor Author

Looks like we want to invert defaults here where the cast by default is name based from talking to @gatesn

Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 20, 2026

Merging this PR will improve performance by 32.81%

⚡ 13 improved benchmarks
✅ 1150 untouched benchmarks
⏩ 1457 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation new_alp_prim_test_between[f64, 32768] 253 µs 193.7 µs +30.6%
Simulation new_bp_prim_test_between[i64, 16384] 145 µs 116.1 µs +24.89%
Simulation new_bp_prim_test_between[i64, 32768] 237 µs 178.4 µs +32.81%
Simulation old_alp_prim_test_between[f32, 32768] 272 µs 241.7 µs +12.54%
Simulation old_alp_prim_test_between[f64, 32768] 351.5 µs 287.2 µs +22.37%
Simulation old_bp_prim_test_between[i32, 32768] 248.9 µs 220.8 µs +12.76%
Simulation old_bp_prim_test_between[i64, 16384] 220.1 µs 189.2 µs +16.31%
Simulation old_alp_prim_test_between[f64, 16384] 238.8 µs 206.9 µs +15.45%
Simulation new_alp_prim_test_between[f32, 32768] 184.8 µs 156.3 µs +18.2%
Simulation new_alp_prim_test_between[f32, 16384] 120.8 µs 106.2 µs +13.76%
Simulation new_alp_prim_test_between[f64, 16384] 157.3 µs 127.8 µs +23.02%
Simulation new_bp_prim_test_between[i32, 32768] 169.8 µs 141.5 µs +19.97%
Simulation old_bp_prim_test_between[i64, 32768] 329.3 µs 266 µs +23.78%

Comparing rk/castopts (19ac0da) with develop (24fcc56)

Open in CodSpeed

Footnotes

  1. 1457 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StructArray field names should be unique

1 participant