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

using column in function when creating view panics #1043

Open
jennifersp opened this issue Dec 5, 2024 · 0 comments
Open

using column in function when creating view panics #1043

jennifersp opened this issue Dec 5, 2024 · 0 comments

Comments

@jennifersp
Copy link
Contributor

We optimize compiled function as a last step in the analyzer, which causes it's argument cannot be replaced. But when creating view, the node gets analyzed again, which it leads updating the column argument in the function to fail. It panics instead of erroring because the error gets dropped here, https://github.com/dolthub/go-mysql-server/blob/main/sql/analyzer/fix_exec_indexes.go#L662

Repro:

CREATE TABLE base_tbl (a int PRIMARY KEY, b text DEFAULT 'Unspecified');
CREATE VIEW rw_view15 AS SELECT a, upper(b) FROM base_tbl;
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

No branches or pull requests

1 participant