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 expression round trip bug #1560

Merged
merged 4 commits into from
Jan 26, 2023
Merged

Conversation

max-hoffman
Copy link
Contributor

@max-hoffman max-hoffman commented Jan 26, 2023

scalar expressions need to round-trip for CHECK constraints, which expect to re-parse what they serialize with String().

Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

LGTM

children := []string{hit.Left().String(), hit.Right().String()}
_ = pr.WriteChildren(children...)
return pr.String()
return fmt.Sprintf("(%s HASH IN %s)", hit.Left(), hit.Right())
Copy link
Member

Choose a reason for hiding this comment

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

This one you can leave alone if you want, it should never show up in something like show create table

@max-hoffman max-hoffman merged commit 3961588 into main Jan 26, 2023
@max-hoffman max-hoffman deleted the max/sclar-expr-str-roundtrip branch January 26, 2023 20:52
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