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

sql: unable to vectorize: "#": syntax error #41407

Closed
maddyblue opened this issue Oct 7, 2019 · 1 comment · Fixed by #42198
Closed

sql: unable to vectorize: "#": syntax error #41407

maddyblue opened this issue Oct 7, 2019 · 1 comment · Fixed by #42198
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-rsg Random Syntax Generator O-sqlsmith

Comments

@maddyblue
Copy link
Contributor

CREATE TABLE IF NOT EXISTS tab_orig AS
	SELECT
		g AS _float8,
		g % 0 = 0 AS _bool,
		g AS _decimal,
		g AS _string,
		g AS _bytes
	FROM
		generate_series(NULL, NULL) AS g;

EXPLAIN (VEC)
	SELECT
		tab_1688._bytes,
		tab_1688._float8,
		tab_1689._string,
		tab_1689._string,
		tab_1688._float8,
		tab_1688._float8,
		tab_1689._bool,
		tab_1690._decimal
	FROM
		tab_orig AS tab_1688
		JOIN tab_orig AS tab_1689
			JOIN tab_orig AS tab_1690 ON
					tab_1689._bool = tab_1690._bool ON
				tab_1688._float8 = tab_1690._float8
				AND tab_1688._bool = tab_1689._bool;
pq: unable to vectorize execution plan: at or near "#": syntax error

This seems a bit odd because there's no # anywhere in the query.

@maddyblue maddyblue added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-sqlsmith O-rsg Random Syntax Generator labels Oct 7, 2019
@yuzefovich
Copy link
Member

The symbol # is added when remapping the indexed variables for ON expressions with vectorized. I'll look into this failure, thanks for finding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-rsg Random Syntax Generator O-sqlsmith
Projects
None yet
4 participants