You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I recognize the query is a bit weird, but I guess it's worth sharing the issue and deciding later whether it should be tackled.
You can reproduce the setup with the following snippet:
DROPDATABASE IF EXISTS analyzer ON CLUSTER tinybird;
CREATEDATABASEanalyzerON CLUSTER tinybird;
CREATETABLEanalyzer.ids ON CLUSTER tinybird (id UUID, whatever String) Engine=MergeTree ORDER BY tuple();
CREATETABLEanalyzer.data ON CLUSTER tinybird (id UUID, event_time DateTime, status String) Engine=MergeTree ORDER BY tuple();
INSERT INTOanalyzer.idsVALUES ('a1451105-722e-4fe7-bfaa-65ad2ae249c2', 'whatever');
INSERT INTOanalyzer.dataVALUES ('a1451105-722e-4fe7-bfaa-65ad2ae249c2', now(), 'CREATED');
When running the following query with the analyzer (in master) you get this error:
SELECT
id,
whatever
FROManalyzer.idsAS l
INNER JOIN clusterAllReplicas(tinybird, merge(analyzer, 'data*')) AS s ONl.id=s.idWHERE (status IN ['CREATED', 'CREATING'])
ORDER BY event_time DESC
SETTINGS allow_experimental_analyzer =1;
Received exception from server (version 24.4.1):
Code: 8. DB::Exception: Received from localhost:9000. DB::Exception: Cannot find column `__table2.event_time`in source stream, there are only columns: [id, event_time, status]. (THERE_IS_NO_COLUMN)
I have tried different approaches to see if I can get those columns properly resolved:
Removing table aliases: FAILS
SELECT
id,
whatever
FROManalyzer.idsINNER JOIN clusterAllReplicas(tinybird, merge(analyzer, 'data*')) USING id
WHERE (status IN ['CREATED', 'CREATING'])
ORDER BY event_time DESC
SETTINGS allow_experimental_analyzer =1;
Received exception from server (version 24.4.1):
Code: 8. DB::Exception: Received from localhost:9000. DB::Exception: Cannot find column `__table2.event_time`in source stream, there are only columns: [id, event_time, status]. (THERE_IS_NO_COLUMN)
Using LEFT JOIN: WORKS
SELECT
id,
whatever
FROManalyzer.idsAS l
LEFT JOIN clusterAllReplicas(tinybird, merge(analyzer, 'data*')) AS s ONl.id=s.idWHERE (status IN ['CREATED', 'CREATING'])
ORDER BY event_time DESC
SETTINGS allow_experimental_analyzer =1;
Removing the merge: WORKS
SELECT
id,
whatever
FROManalyzer.idsINNER JOIN clusterAllReplicas(tinybird, analyzer.data) USING id
WHERE (status IN ['CREATED', 'CREATING'])
ORDER BY event_time DESC
SETTINGS allow_experimental_analyzer =1;
Removing the clusterAllReplicas: WORKS
SELECT
id,
whatever
FROManalyzer.idsAS l
INNER JOIN merge(analyzer, 'data*') AS s ONl.id=s.idWHERE (status IN ['CREATED', 'CREATING'])
ORDER BY event_time DESC
SETTINGS allow_experimental_analyzer =1;
Removing the analyzer: WORKS
SELECT
id,
whatever
FROManalyzer.idsAS l
INNER JOIN clusterAllReplicas(tinybird, merge(analyzer, 'data*')) AS s ONl.id=s.idWHERE (status IN ['CREATED', 'CREATING'])
ORDER BY event_time DESC
SETTINGS allow_experimental_analyzer =0;
I can't figure out why the combinations of these three are making the query fail, but it's related somehow.
The text was updated successfully, but these errors were encountered:
First of all, I recognize the query is a bit weird, but I guess it's worth sharing the issue and deciding later whether it should be tackled.
You can reproduce the setup with the following snippet:
When running the following query with the analyzer (in master) you get this error:
I have tried different approaches to see if I can get those columns properly resolved:
merge
: WORKSclusterAllReplicas
: WORKSI can't figure out why the combinations of these three are making the query fail, but it's related somehow.
The text was updated successfully, but these errors were encountered: