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
GUI model joining native ones break with column not found error #40252
Comments
This is now broken on
Column "source.B1" not found; SQL statement:
|
It's broken on 49.1 but works fine on 49.2 @zbodi74 could you please confirm? |
@uladzimirdev - confirmed, it works fine on 49.2. |
The issue still exists, the key point is |
I added a repro test for this issue #40772 also the test passed at CI and in simulating fast 3g, but fails when you run it locally on full speed (the issue comes from BE), maybe some race condition. Stacktrace is added to the repro issue |
For some reason this wouldn't repro for me on the first edit of the column name in the metadata. I edited it again and saw the issue. The generated SQL shows the issue fairly plainly: SELECT
"source"."A1" AS "A1",
"source"."A2" AS "A2",
"source"."B1" AS "B1",
"source"."B2" AS "B2"
FROM (
SELECT
"source"."A1" AS "A1",
"source"."A2" AS "A2",
"B - A1"."B1" AS "B - A1__B1",
"B - A1"."B2" AS "B - A1__B2"
FROM (select 1 as a1, 2 as a2) AS "source"
INNER JOIN (select 1 as b1, 2 as b2) AS "B - A1"
ON "source"."A1" = "B - A1"."B1"
) AS "source"
LIMIT 2000 The outermost layer's I've got a fix on the way for this. |
@bshepherdson have you tried running the linked repro e2e? |
Not yet, but I'll be sure to test it as part of the PR. |
This logic was trying to match `[name join-alias]` pairs previously, but that won't work since the later stage field doesn't have a `:join-alias` on it. This falls back to matching on only the ID or name, but only if it's unambiguous. Fixes #40252.
This logic was trying to match `[name join-alias]` pairs previously, but that won't work since the later stage field doesn't have a `:join-alias` on it. This falls back to matching on only the ID or name, but only if it's unambiguous. Fixes #40252.
This logic was trying to match `[name join-alias]` pairs previously, but that won't work since the later stage field doesn't have a `:join-alias` on it. This falls back to matching on only the ID or name, but only if it's unambiguous. Fixes #40252.
…0933)" (#40987) This logic was trying to match `[name join-alias]` pairs previously, but that won't work since the later stage field doesn't have a `:join-alias` on it. This falls back to matching on only the ID or name, but only if it's unambiguous. See #40252. Co-authored-by: Braden Shepherdson <braden@metabase.com>
Describe the bug
After updating its metadata, GUI based model joining native models break with a column not found error.
To Reproduce
(See a simpler way to reproduce in the comments below).
wcount
:gcount
:Create a GUI model
joined
: inner join models created on step 1 and 2, on the year column. Save it.Edit the metadata of
joined
, and rename the count(*) fields: WidgetCount, GadgetCount. Save it.See it break:
Expected behavior
It should work.
Logs
n/a
Information about your Metabase installation
Seen this on master (stats) as of:
I could not reproduce this on v1.49.0, so I also added the .Regression label.
Severity
Probably P2 - I found it while troubleshooting something else), it might be a regression though.
Additional context
SQL generated:
The text was updated successfully, but these errors were encountered: