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

Comma join on values without any aliases results in variable not found warnings #1742

Open
alancai98 opened this issue Feb 20, 2025 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers S Small sized task

Comments

@alancai98
Copy link
Member

alancai98 commented Feb 20, 2025

Description

  • Comma joining two values in a from source without any alias results in variable not found warnings from the planner

To Reproduce

Steps to reproduce the behavior:

PartiQL Shell
Version: 1.1.0-742e1501c
partiql ▶ SELECT * FROM <<{'a': 1}>>, <<{'a': 2}>>;
w: [semantic] Variable reference (_0) could not be found in the database environment or in the set of available locals. Locals: [_0].
w: [semantic] Expression always returns missing
w: [semantic] Variable reference (_0) could not be found in the database environment or in the set of available locals. Locals: [_0].
w: [semantic] Variable reference (_0) could not be found in the database environment or in the set of available locals. Locals: [_0].
w: [semantic] Variable reference (_0) could not be found in the database environment or in the set of available locals. Locals: [_0].
w: [semantic] Expression always returns missing
w: [semantic] Variable reference (_0) could not be found in the database environment or in the set of available locals. Locals: [_0].
w: [semantic] Variable reference (_0) could not be found in the database environment or in the set of available locals. Locals: [_0].

=== RESULT ===
<<
  {}
>>

Expected Behavior

When doing a normal explicit CROSS JOIN or providing an alias to one or more values, it works as expected

Using a CROSS JOIN

partiql ▶ SELECT * FROM <<{'a': 1}>> CROSS JOIN <<{'a': 2}>>;

=== RESULT ===
<<
  {
    a: 1,
    a: 2
  }
>>

OK!

Providing an alias to the comma-join values:

partiql ▶ SELECT * FROM <<{'a': 1}>> AS t1, <<{'a': 2}>> AS t2;

=== RESULT ===
<<
  {
    a: 1,
    a: 2
  }
>>

Additional Context

  • Java version: 17
  • PartiQL version: 1.1.0-742e1501c
  • Add any other context about the problem here.
    • Pre-1.0 CLIs do not exhibit this behavior.
@alancai98 alancai98 added bug Something isn't working good first issue Good for newcomers S Small sized task labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers S Small sized task
Projects
None yet
Development

No branches or pull requests

1 participant