FE client incorrectly using [:field <string>]
clauses to refer to fields inside MBQL source queries
#19757
Labels
Difficulty:Medium
.Frontend
Querying/Nested Queries
Questions based on other saved questions
Querying/Parameters & Variables
Filter widgets, field filters, variables etc.
.Team/QueryProcessor
:hammer_and_wrench:
Type:Bug
Product defects
.Wanted: MLv2
Issues that will be fixed (or easier to fix, or possible to fix) when we have MLv2
Milestone
This is incorrect and has historically caused all sorts of bugs (#14809, #14810, #14811, #16389, and more) From my comments here #16389 (comment):
I've been trying to just figure out what the FE client meant and rewrite the query accordingly, first in #14812 and now in #19713; this is easier said than done because the FE client is choosing names different than either the actual name of the underlying Field or the actual name of the column as returned by the source query.
The frontend client should use the
:field_ref
that comes back with query results metadata (the Field ref is the canonical way to refer to a Field), or, failing that, just use the Field ID directly -- it's much easier for us to reconcile Fields when we actually know what Field it is we're talking about, and integer IDs are much easier to reconcile than lower-cased versions of Field names (as we saw in #19713).If that proves too challenging, why are we even lower casing names on the frontend at all? #14812 would have been sufficient to prevent #16389 if the actual original name of the Field was used. 😖
The text was updated successfully, but these errors were encountered: