Skip to content

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