restore aliases before annotating (#27637)
* restore aliases before annotating * cleanup * fix tests * Don't add escaped->original if aliases have not changed No need to walk and replace the aliases if they are identical. And in that case, no need to keep a mapping of identical to identical. Not super important but saves some time and complexity, and keeps other tests passing since the presence of [:info :alias/escaped->original] in the query caused them to trivially fail. * oracle has a smaller limit and _expected_ mangled previous testing behavior was "what happened" and not what should happen. we fixed the bug but the "expect garbage" behavior was still present * Relax :alias/escaped->original schema oracle tests use keywords for the alias ```clojure {:alias/escaped->original {:test-data-venues--via-a763718f "test_data_venues__via__venue_id", :test-data-users--via--user-id "test_data_users__via__user_id"}}} ``` No idea why that is keyworded * relax `:alias/escaped->original` schema see previous commit
Showing
- shared/src/metabase/mbql/schema.cljc 8 additions, 7 deletionsshared/src/metabase/mbql/schema.cljc
- src/metabase/query_processor/middleware/annotate.clj 8 additions, 4 deletionssrc/metabase/query_processor/middleware/annotate.clj
- src/metabase/query_processor/middleware/escape_join_aliases.clj 18 additions, 3 deletions...tabase/query_processor/middleware/escape_join_aliases.clj
- test/metabase/query_processor/middleware/annotate_test.clj 29 additions, 0 deletionstest/metabase/query_processor/middleware/annotate_test.clj
- test/metabase/query_processor/middleware/escape_join_aliases_test.clj 25 additions, 3 deletions...e/query_processor/middleware/escape_join_aliases_test.clj
- test/metabase/query_processor_test.clj 2 additions, 4 deletionstest/metabase/query_processor_test.clj
Please register or sign in to comment