Skip to content
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

fix: substring with negative indices should produce correct result #470

Merged
merged 1 commit into from
May 26, 2024

Conversation

sonhmai
Copy link
Contributor

@sonhmai sonhmai commented May 25, 2024

Which issue does this PR close?

Closes #463

Rationale for this change

Fix for substring with negative indices produces incorrect results

What changes are included in this PR?

  • negative len in substring(child, start, len) should be >= 0
  • test cases

How are these changes tested?

added more test cases that would fail without the change.

@sonhmai
Copy link
Contributor Author

sonhmai commented May 25, 2024

@viirya @andygrove can you take a look. Thanks

Copy link
Member

@andygrove andygrove 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 @sonhmai

@viirya viirya merged commit 7ba5693 into apache:main May 26, 2024
41 checks passed
@viirya
Copy link
Member

viirya commented May 26, 2024

Merged. Thanks @sonhmai @andygrove

himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
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.

bug: substring with negative indices produces incorrect results
3 participants