[MLv2] Fix NULL FK values in the QP and drill-thru (#35567)
The QP returns "large int" IDs like FKs as string, since JS doubles only guarantee 51 bits of mantissa and a 64-bit ID might get rounded. However NULL IDs were getting returned as `""` empty strings. This fixes the QP middleware to return `nil` (JS `null`). In addition, the drill-thru logic in the FE and MLv2 was trying to filter incorrectly with a NULL value. This PR prevents the FK filter drill from returning anything in that case. I filed #35561 to track the fact that would be useful to drill thru to all rows with a NULL for some FK, but it's low priority. Fixes #13957.
Showing
- src/metabase/lib/drill_thru/foreign_key.cljc 1 addition, 0 deletionssrc/metabase/lib/drill_thru/foreign_key.cljc
- src/metabase/query_processor/middleware/large_int_id.clj 6 additions, 2 deletionssrc/metabase/query_processor/middleware/large_int_id.clj
- test/metabase/lib/drill_thru/foreign_key_test.cljc 13 additions, 0 deletionstest/metabase/lib/drill_thru/foreign_key_test.cljc
- test/metabase/query_processor/middleware/large_int_id_test.clj 9 additions, 0 deletions...metabase/query_processor/middleware/large_int_id_test.clj
Loading
Please register or sign in to comment