-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
opt: Fix bug in function interning. #30530
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 1 stale)
pkg/sql/opt/memo/private_storage_test.go, line 567 at r1 (raw file):
// Same type, different overloads. funcDef3 := &FuncOpDef{Name: "bar", Type: ttuple2, Properties: nowProps, Overload: &nowOvls[1]}
now this is a different type from funcDef2
Some builtin function overloads have a return type that's dependent on the type of its parameters (e.g. unnest). This means that two FuncOpDef structs with the same overload can have different Type fields. Therefore, the FuncOpDef interning needs to incorporate that type. Release note: None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 2 of 0 LGTMs obtained
pkg/sql/opt/memo/private_storage_test.go, line 567 at r1 (raw file):
Previously, rytaft wrote…
now this is a different type from
funcDef2
Whoops, good catch. Fixed.
5cf043a
to
77dce3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 2 stale)
bors r+ |
30530: opt: Fix bug in function interning. r=andy-kimball a=andy-kimball Some builtin function overloads have a return type that's dependent on the type of its parameters (e.g. unnest). This means that two FuncOpDef structs with the same overload can have different Type fields. Therefore, the FuncOpDef interning needs to incorporate that type. Release note: None 30608: sqlbase: introduce RowFetcher.Reset() r=jordanlewis a=jordanlewis In preparation for pooling tableReader objects and reusing internal allocated memory. Broken out from #30556. Release note: None 30727: cli: Make "unknown sub-command" error clearer for empty subcommands r=a-robinson a=a-robinson I ran `cockroach zone` to try and get the list of available sub-commands printed as help text, but ended up getting confused by what it printed: Error: unknown sub-command: Failed running "zone" I wasn't really sure what this meant. Now it'll print: Error: unknown sub-command: "" Failed running "zone" It may also be better to say something like "unknown or missing sub-command". Let me know if you'd prefer that. Release note: None --- Along these lines, how come the available subcommands don't get printed anymore? I can't get them listed either with `cockroach zone` or `cockroach zone -h`. I could have sworn we used to list them. Did cobra change? Maybe I'm conflating cockroach with other tools. It'd certainly be nice if we did, though. Co-authored-by: Andrew Kimball <andyk@cockroachlabs.com> Co-authored-by: Jordan Lewis <jordanthelewis@gmail.com> Co-authored-by: Alex Robinson <alexdwanerobinson@gmail.com>
Build succeeded |
Some builtin function overloads have a return type that's dependent on
the type of its parameters (e.g. unnest). This means that two FuncOpDef
structs with the same overload can have different Type fields. Therefore,
the FuncOpDef interning needs to incorporate that type.
Release note: None