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

fix: Error on missing nested SELECT.from.SELECT.from.ref #1114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danjoa
Copy link
Contributor

@danjoa danjoa commented Apr 2, 2025

@johannes-vogel
Copy link
Contributor

I think we have to add a test for this, before this release it was

...(transformedQuery.SELECT.from.ref || /* subq in from */ transformedQuery.SELECT.from.target.name),

however, i don't know how it worked ...

@hakimio
Copy link

hakimio commented Apr 2, 2025

@johannes-vogel before it was:

...(transformedQuery.SELECT.from.ref || /* subq in from */ [transformedQuery.SELECT.from.target.name]),

0828c25#diff-3406bdae94230d4664b3a51d7efa5f3807f2a43095a9089ff018c5a5faf7ca3aL803-L806

It worked because of ...[transformedQuery.SELECT.from.target.name].

@johannes-vogel
Copy link
Contributor

It worked because of ...[transformedQuery.SELECT.from.target.name].

This part I understood. However, a query is not designed to have a target in SELECT.from.

@danjoa
Copy link
Contributor Author

danjoa commented Apr 3, 2025

Exactly I wondered how that would have worked before. We really should have a test

@hakimio
Copy link

hakimio commented Apr 3, 2025

@johannes-vogel here is the answer:

if we select from <subquery> we do not have a SELECT.from.ref but the <subquery> has a .target because it has been inferred properly.

Use the name of the .target for building the correlated subquery, instead of dumping.

#709

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.

[REGRESSION] db-service aggregation query throws error
3 participants