We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following query produces incorrect results in the evaluating compiler
SELECT t1.a, t2.a FROM <<{ 'a': 1 }>> AS t1 LEFT JOIN <<{ 'a': 2.0 }>> AS t2 ON t1.a = t2.a -- incorrect << { 'a': 1 } >>
The correct results should be
<< { 'a': 1, 'a': NULL, } >>
The SELECT clause is normalized (via spec rule 6.3.1) to SELECT VALUE { 'a': t1.a, 'a': t2.a } and the output binding tuples of the JOIN should be
SELECT VALUE { 'a': t1.a, 'a': t2.a }
<< < 't1': { 'a': 1 }, 't2': { 'a': NULL } > >>
In practice, the LEFT JOIN is actually producing < 't1': { 'a': 1 }, 't2': NULL > hence why t2.a -> MISSING and is dropped from the result.
< 't1': { 'a': 1 }, 't2': NULL >
t2.a -> MISSING
In SQL terms, our LEFT JOIN is producing
(v_1 , ... , v_n ) || NULL when it should be (v_1, ..., v_n) || (NULL, ..., NULL)
(v_1 , ... , v_n ) || NULL
(v_1, ..., v_n) || (NULL, ..., NULL)
Run
SELECT t1.a, t2.a FROM <<{ 'a': 1 }>> AS t1 LEFT JOIN <<{ 'a': 2.0 }>> AS t2 ON t1.a = t2.a
We expected left JOIN to pad the right-hand-side with a tuple of NULL values rather than replacing the tuple with a single NULL.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The following query produces incorrect results in the evaluating compiler
The correct results should be
The SELECT clause is normalized (via spec rule 6.3.1) to
SELECT VALUE { 'a': t1.a, 'a': t2.a }
and the output binding tuples of the JOIN should beIn practice, the LEFT JOIN is actually producing
< 't1': { 'a': 1 }, 't2': NULL >
hence whyt2.a -> MISSING
and is dropped from the result.In SQL terms, our LEFT JOIN is producing
(v_1 , ... , v_n ) || NULL
when it should be(v_1, ..., v_n) || (NULL, ..., NULL)
To Reproduce
Run
Expected Behavior
We expected left JOIN to pad the right-hand-side with a tuple of NULL values rather than replacing the tuple with a single NULL.
Additional Context
The text was updated successfully, but these errors were encountered: