Skip to content

Type Coercion#6960

Merged
gatesn merged 8 commits into
developfrom
ngates/type-coercion
Mar 13, 2026
Merged

Type Coercion#6960
gatesn merged 8 commits into
developfrom
ngates/type-coercion

Conversation

@gatesn

@gatesn gatesn commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

This allows Vortex expressions to be typed in contexts that currently don't have their own logical planner, for example expressions passed into PyVortex.

gatesn added 2 commits March 13, 2026 14:35
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
@gatesn gatesn added the changelog/feature A new feature label Mar 13, 2026
@codspeed-hq

codspeed-hq Bot commented Mar 13, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 1009 untouched benchmarks
⏩ 1515 skipped benchmarks1


Comparing ngates/type-coercion (f5d2adf) with develop (da4c196)

Open in CodSpeed

Footnotes

  1. 1515 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: Nicholas Gates <nick@nickgates.com>
@gatesn gatesn marked this pull request as ready for review March 13, 2026 18:44
gatesn added 4 commits March 13, 2026 15:00
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
@gatesn gatesn enabled auto-merge (squash) March 13, 2026 19:17
@gatesn gatesn requested a review from lwwmanning March 13, 2026 19:18
@gatesn gatesn disabled auto-merge March 13, 2026 19:23
Comment on lines +52 to +53
if child_dtype.eq_ignore_nullability(target)
&& child_dtype.nullability() == target.nullability()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is just eq?

return Some(self.with_nullability(self.nullability() | other.nullability()));
}

let union_null = self.nullability() | other.nullability();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: move this up

Signed-off-by: Nicholas Gates <nick@nickgates.com>
@gatesn gatesn enabled auto-merge (squash) March 13, 2026 19:38
@gatesn gatesn disabled auto-merge March 13, 2026 19:55
@gatesn gatesn merged commit 74a31af into develop Mar 13, 2026
94 of 96 checks passed
@gatesn gatesn deleted the ngates/type-coercion branch March 13, 2026 19:55
@AdamGS

AdamGS commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

We used to talk about expressions as being tightly typed and physical, this seems like a pretty big break from that?

@connortsui20

Copy link
Copy Markdown
Member

I think we need to have the ability to upcast due to our type narrowing? I believe the idea is that we want the ability to do query planning within Vortex without relying on other systems, and in that case we need to know what is possible to coerce / cast. I guess it's an open question on if this is the right way to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants