Skip to content

Conversation

@bziobrowski
Copy link
Contributor

Fixes #3733

PR fixes propagation of non-equality join condition columns .
Example:

create table test (event int, created timestamp);

SELECT count(*)
FROM test as T1
JOIN ( SELECT * FROM test ) as T2 ON T1.event < T2.event
JOIN test as T3 ON T2.created = T3.created;

returns invalid column T2.event error because T2.event is pushed to top-most T2 only model.

@jerrinot jerrinot self-requested a review November 6, 2023 14:09
@puzpuzpuz puzpuzpuz changed the title fix(sql): fix 'Invalid column' coumn error for columns used in non-equality join conditions fix(sql): fix 'Invalid column' column error for columns used in non-equality join conditions Nov 7, 2023
@puzpuzpuz puzpuzpuz added Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution labels Nov 7, 2023
@ideoma
Copy link
Collaborator

ideoma commented Nov 7, 2023

[PR Coverage check]

😍 pass : 3 / 3 (100.00%)

file detail

path covered line new line coverage
🔵 io/questdb/griffin/SqlOptimiser.java 3 3 100.00%

@ideoma ideoma merged commit d7e11fe into master Nov 7, 2023
@ideoma ideoma deleted the bz_fix_invalid_column_error branch November 7, 2023 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid column error not completely fixed

5 participants