Skip to content

Conversation

@max-hoffman
Copy link
Contributor

No description provided.

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, see comments

},
tests: []JoinOpTests{
{
Query: "select /*+ JOIN_ORDER(ab,xy) */ x from xy left join ab on x = a and z = 5 where a is null order by x ",
Copy link
Member

Choose a reason for hiding this comment

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

Kind of surprised this join hint does anything, isn't it ignored? Maybe add a comment

Copy link
Contributor Author

@max-hoffman max-hoffman Feb 4, 2025

Choose a reason for hiding this comment

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

for these tests join order does not appear to be respected, the hint and join code has a lot of change, i imagine it worked at some point, we should probably fix that

"insert into ab values (0,1,0), (1,2,1), (2,3,2), (3,4,3);",
},
},
tests: []JoinOpTests{
Copy link
Member

Choose a reason for hiding this comment

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

Because of the z=5 join condition, you're getting every row in the left table in the result set. You should have a variant where not every row in the left corner is included (because there is a match for at least one of the rows in the right-hand side of the join).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added more tests

},
},
{
name: "type conversion panic bug",
Copy link
Member

Choose a reason for hiding this comment

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

Should add a comment with details on what the error is here (comparing varchar to int literal)

@max-hoffman max-hoffman merged commit d8430eb into main Feb 4, 2025
7 of 8 checks passed
@max-hoffman max-hoffman deleted the max/left-join-null-bug branch February 4, 2025 22:08
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.

3 participants