Skip to content

Add span for Expr::TypedString #1919

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 4 commits into from
Jul 3, 2025
Merged

Add span for Expr::TypedString #1919

merged 4 commits into from
Jul 3, 2025

Conversation

feral-dot-io
Copy link
Contributor

I have need to get the location info of an Expr::TypedString but this currently returns a Value rather than a ValueWithSpan. I saw that the parser already has access to this information. So this is a small PR changes Expr::TypedString to use a ValueWithSpan.

I have also updated the test cases and docs.

One issue with this PR is that the I've used Span::empty() in the test cases and it still passed. Looking at a PG test more closely the span was being filled with non-zero locations. Checking another PG test it seemed that span tests were skipped by using pattern matching; I didn't want to do this because I wanted to avoid accidentally change the tests. Or it might be fine as it is. Let me know how you'd like to deal with this.

@iffyio iffyio changed the title Span for Expr::TypedString Add span for Expr::TypedString Jul 3, 2025
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @feral-dot-io!
cc @alamb

@iffyio iffyio merged commit 9020385 into apache:main Jul 3, 2025
10 checks passed
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