Skip to content
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

Fix failing remapping tests #10

Closed
kaklakariada opened this issue Dec 22, 2021 · 0 comments · Fixed by #31
Closed

Fix failing remapping tests #10

kaklakariada opened this issue Dec 22, 2021 · 0 comments · Fixed by #31
Labels
bug Something isn't working

Comments

@kaklakariada
Copy link
Collaborator

kaklakariada commented Dec 22, 2021

Three tests in metabase.query-processor-test.breakout-test and metabase.query-processor-test.remapping-test fail:

metabase.query-processor-test.breakout-test/internal-remapping-test

FAIL in metabase.query-processor-test.breakout-test/internal-remapping-test (breakout_test.clj:80)

:exasol With human readable values remapping test_data_venues.category_id -> {65 "Spanish", 70 "Tea Room", 62 "Seafood", 74 "Wine Bar", 7 "Bar", 59 "Ramen", 20 "Diner", 72 "Unknown", 58 "Pizza", 60 "Restaurant General", 27 "French", 1 "African", 69 "Tapas", 24 "Fashion", 55 "Nightclub", 39 "Italian", 46 "Late Dining", 4 "Asian", 54 "Museum", 15 "Chinese", 48 "Lounge", 50 "Mexican", 75 "Winery", 21 "Donut Shop", 31 "Greek", 32 "Grocery", 40 "Japanese", 56 "Nightlife", 33 "Health & Beauty", 13 "Café Sweets", 22 "English", 36 "Hot Dog", 41 "Jewish", 43 "Karaoke", 61 "Scandinavian", 29 "German", 44 "Korean", 6 "Bakery", 28 "Gay Bar", 64 "Southern", 51 "Middle Eastern", 25 "Fast Food", 34 "Home", 17 "Comedy Club", 3 "Artisan", 12 "Café", 2 "American", 66 "Stadium", 23 "Entertainment", 47 "Latin American", 35 "Hostel", 19 "Dim Sum", 57 "Outdoors", 68 "Strip Club", 11 "Burger", 9 "Breakfast / Brunch", 5 "BBQ", 14 "Caribbean", 45 "Landmark", 53 "Moroccan", 26 "Food Truck", 16 "Coffee Shop", 38 "Indian", 30 "Gluten-free", 73 "Vegetarian / Vegan", 10 "Brewery", 18 "Deli", 52 "Molecular Gastronomy", 67 "Steakhouse", 71 "Thai", 42 "Juice Bar", 37 "Hotel", 63 "South Pacific", 8 "Beer Garden", 49 "Mediterannian"}
expected: [[2 8 "American"]
           [3 2 "Artisan"]
           [4 2 "Asian"]
           [5 7 "BBQ"]
           [6 2 "Bakery"]]
  actual: ([[2 8 nil] [3 2 nil] [4 2 nil] [5 7 nil] [6 2 nil]])

Ran 1 tests in 13,372 seconds
2 assertions, 1 failure, 0 errors.
{:test 1, :pass 1, :fail 1, :error 0, :type :summary, :duration 13372.156896}
Tests failed.

Executed queries:

-- Metabase
SELECT "CAM_8"."test_data_venues"."category_id" AS "category_id", count(*) AS "count" FROM "CAM_8"."test_data_venues" GROUP BY "CAM_8"."test_data_venues"."category_id" ORDER BY "CAM_8"."test_data_venues"."category_id" ASC LIMIT 5
-- Metabase
SELECT "CAM_8"."test_data_categories"."id" AS "id", "CAM_8"."test_data_categories"."name" AS "name" FROM "CAM_8"."test_data_categories" LIMIT 1048575
-- Metabase
SELECT "CAM_8"."test_data_venues"."name" AS "name" FROM "CAM_8"."test_data_venues" GROUP BY "CAM_8"."test_data_venues"."name" ORDER BY "CAM_8"."test_data_venues"."name" ASC LIMIT 5000
-- Metabase
SELECT "CAM_8"."test_data_users"."password" AS "password" FROM "CAM_8"."test_data_users" GROUP BY "CAM_8"."test_data_users"."password" ORDER BY "CAM_8"."test_data_users"."password" ASC LIMIT 5000
-- Metabase
SELECT "CAM_8"."test_data_users"."name" AS "name" FROM "CAM_8"."test_data_users" GROUP BY "CAM_8"."test_data_users"."name" ORDER BY "CAM_8"."test_data_users"."name" ASC LIMIT 5000
-- Metabase
SELECT "CAM_8"."test_data_categories"."name" AS "name" FROM "CAM_8"."test_data_categories" GROUP BY "CAM_8"."test_data_categories"."name" ORDER BY "CAM_8"."test_data_categories"."name" ASC LIMIT 5000
-- Metabase
SELECT "source"."category_id" AS "category_id", "source"."latitude" AS "latitude", "source"."price" AS "price", "source"."substring82881" AS "substring82881", "source"."longitude" AS "longitude" FROM (SELECT "CAM_8"."test_data_venues"."category_id" AS "category_id", "CAM_8"."test_data_venues"."latitude" AS "latitude", "CAM_8"."test_data_venues"."price" AS "price", substring("CAM_8"."test_data_venues"."name", 1, 1234) AS "substring82881", "CAM_8"."test_data_venues"."longitude" AS "longitude" FROM "CAM_8"."test_data_venues") "source" LIMIT 10000
-- Metabase
SELECT "source"."substring82870" AS "substring82870", "source"."substring82871" AS "substring82871", "source"."last_login" AS "last_login" FROM (SELECT substring("CAM_8"."test_data_users"."name", 1, 1234) AS "substring82870", substring("CAM_8"."test_data_users"."password", 1, 1234) AS "substring82871", "CAM_8"."test_data_users"."last_login" AS "last_login" FROM "CAM_8"."test_data_users") "source" LIMIT 10000
-- Metabase
SELECT "source"."substring82866" AS "substring82866" FROM (SELECT substring("CAM_8"."test_data_categories"."name", 1, 1234) AS "substring82866" FROM "CAM_8"."test_data_categories") "source" LIMIT 10000
-- Metabase
SELECT "CAM_8"."test_data_checkins"."venue_id" AS "venue_id", "CAM_8"."test_data_checkins"."date" AS "date", "CAM_8"."test_data_checkins"."user_id" AS "user_id" FROM "CAM_8"."test_data_checkins" LIMIT 10000

metabase.query-processor-test.remapping-test/basic-remapping-test

FAIL in metabase.query-processor-test.remapping-test/basic-remapping-test (remapping_test.clj:14)

:exasol With human readable values remapping test_data_venues.category_id -> {65 "Spanish", 70 "Tea Room", 62 "Seafood", 74 "Wine Bar", 7 "Bar", 59 "Ramen", 20 "Diner", 72 "Unknown", 58 "Pizza", 60 "Restaurant General", 27 "French", 1 "African", 69 "Tapas", 24 "Fashion", 55 "Nightclub", 39 "Italian", 46 "Late Dining", 4 "Asian", 54 "Museum", 15 "Chinese", 48 "Lounge", 50 "Mexican", 75 "Winery", 21 "Donut Shop", 31 "Greek", 32 "Grocery", 40 "Japanese", 56 "Nightlife", 33 "Health & Beauty", 13 "Café Sweets", 22 "English", 36 "Hot Dog", 41 "Jewish", 43 "Karaoke", 61 "Scandinavian", 29 "German", 44 "Korean", 6 "Bakery", 28 "Gay Bar", 64 "Southern", 51 "Middle Eastern", 25 "Fast Food", 34 "Home", 17 "Comedy Club", 3 "Artisan", 12 "Café", 2 "American", 66 "Stadium", 23 "Entertainment", 47 "Latin American", 35 "Hostel", 19 "Dim Sum", 57 "Outdoors", 68 "Strip Club", 11 "Burger", 9 "Breakfast / Brunch", 5 "BBQ", 14 "Caribbean", 45 "Landmark", 53 "Moroccan", 26 "Food Truck", 16 "Coffee Shop", 38 "Indian", 30 "Gluten-free", 73 "Vegetarian / Vegan", 10 "Brewery", 18 "Deli", 52 "Molecular Gastronomy", 67 "Steakhouse", 71 "Thai", 42 "Juice Bar", 37 "Hotel", 63 "South Pacific", 8 "Beer Garden", 49 "Mediterannian"}
expected: {:cols [{:base_type :type/Text,
                   :coercion_strategy nil,
                   :description nil,
                   :display_name "Name",
                   :effective_type :type/Text,
                   :field_ref [:field 377 nil],
                   :fingerprint {:global {:distinct-count 100, :nil% 0.0},
                                 :type {:type/Text {:average-length 15.63,
                                                    :percent-email 0.0,
                                                    :percent-json 0.0,
                                                    :percent-state 0.0,
                                                    :percent-url 0.0}}},
                   :id 377,
                   :name "name",
                   :parent_id nil,
                   :semantic_type :type/Name,
                   :settings nil,
                   :source :fields,
                   :table_id 184,
                   :visibility_type :normal}
                  {:base_type :type/Decimal,
                   :coercion_strategy nil,
                   :description nil,
                   :display_name "Category ID",
                   :effective_type :type/Decimal,
                   :field_ref [:field 374 nil],
                   :fingerprint {:global {:distinct-count 28, :nil% 0.0}},
                   :id 374,
                   :name "category_id",
                   :parent_id nil,
                   :remapped_to "Category ID",
                   :semantic_type :type/FK,
                   :settings nil,
                   :source :fields,
                   :table_id 184,
                   :visibility_type :normal}
                  {:base_type :type/Text,
                   :description nil,
                   :display_name "Category ID",
                   :id nil,
                   :name "Category ID",
                   :remapped_from "category_id",
                   :remapped_to nil,
                   :semantic_type nil,
                   :table_id nil,
                   :target nil}],
           :rows [["20th Century Cafe" 12 "Café"]
                  ["25°" 11 "Burger"]
                  ["33 Taps" 7 "Bar"]
                  ["800 Degrees Neapolitan Pizzeria" 58 "Pizza"]]}
  actual: ({:cols [{:base_type :type/Text,
                    :coercion_strategy nil,
                    :description nil,
                    :display_name "Name",
                    :effective_type :type/Text,
                    :field_ref [:field 377 nil],
                    :fingerprint {:global {:distinct-count 100, :nil% 0.0},
                                  :type {:type/Text {:average-length 15.63,
                                                     :percent-email 0.0,
                                                     :percent-json 0.0,
                                                     :percent-state 0.0,
                                                     :percent-url 0.0}}},
                    :id 377,
                    :name "name",
                    :parent_id nil,
                    :semantic_type :type/Name,
                    :settings nil,
                    :source :fields,
                    :table_id 184,
                    :visibility_type :normal}
                   {:base_type :type/Decimal,
                    :coercion_strategy nil,
                    :description nil,
                    :display_name "Category ID",
                    :effective_type :type/Decimal,
                    :field_ref [:field 374 nil],
                    :fingerprint {:global {:distinct-count 28, :nil% 0.0}},
                    :id 374,
                    :name "category_id",
                    :parent_id nil,
                    :remapped_to "Category ID",
                    :semantic_type :type/FK,
                    :settings nil,
                    :source :fields,
                    :table_id 184,
                    :visibility_type :normal}
                   {:base_type :type/Text,
                    :description nil,
                    :display_name "Category ID",
                    :id nil,
                    :name "Category ID",
                    :remapped_from "category_id",
                    :remapped_to nil,
                    :semantic_type nil,
                    :table_id nil,
                    :target nil}],
            :rows [["20th Century Cafe" 12 nil]
                   ["25°" 11 nil]
                   ["33 Taps" 7 nil]
                   ["800 Degrees Neapolitan Pizzeria" 58 nil]]})

metabase.query-processor-test.remapping-test/nested-remapping-test

FAIL in metabase.query-processor-test.remapping-test/nested-remapping-test (remapping_test.clj:59)

:exasol With human readable values remapping test_data_venues.category_id -> {65 "Spanish", 70 "Tea Room", 62 "Seafood", 74 "Wine Bar", 7 "Bar", 59 "Ramen", 20 "Diner", 72 "Unknown", 58 "Pizza", 60 "Restaurant General", 27 "French", 1 "African", 69 "Tapas", 24 "Fashion", 55 "Nightclub", 39 "Italian", 46 "Late Dining", 4 "Asian", 54 "Museum", 15 "Chinese", 48 "Lounge", 50 "Mexican", 75 "Winery", 21 "Donut Shop", 31 "Greek", 32 "Grocery", 40 "Japanese", 56 "Nightlife", 33 "Health & Beauty", 13 "Café Sweets", 22 "English", 36 "Hot Dog", 41 "Jewish", 43 "Karaoke", 61 "Scandinavian", 29 "German", 44 "Korean", 6 "Bakery", 28 "Gay Bar", 64 "Southern", 51 "Middle Eastern", 25 "Fast Food", 34 "Home", 17 "Comedy Club", 3 "Artisan", 12 "Café", 2 "American", 66 "Stadium", 23 "Entertainment", 47 "Latin American", 35 "Hostel", 19 "Dim Sum", 57 "Outdoors", 68 "Strip Club", 11 "Burger", 9 "Breakfast / Brunch", 5 "BBQ", 14 "Caribbean", 45 "Landmark", 53 "Moroccan", 26 "Food Truck", 16 "Coffee Shop", 38 "Indian", 30 "Gluten-free", 73 "Vegetarian / Vegan", 10 "Brewery", 18 "Deli", 52 "Molecular Gastronomy", 67 "Steakhouse", 71 "Thai", 42 "Juice Bar", 37 "Hotel", 63 "South Pacific", 8 "Beer Garden", 49 "Mediterannian"}
expected: {:cols [{:base_type :type/Text,
                   :coercion_strategy nil,
                   :description nil,
                   :display_name "Name",
                   :effective_type :type/Text,
                   :field_ref [:field 377 nil],
                   :fingerprint {:global {:distinct-count 100, :nil% 0.0},
                                 :type {:type/Text {:average-length 15.63,
                                                    :percent-email 0.0,
                                                    :percent-json 0.0,
                                                    :percent-state 0.0,
                                                    :percent-url 0.0}}},
                   :id 377,
                   :name "name",
                   :parent_id nil,
                   :semantic_type :type/Name,
                   :settings nil,
                   :source :fields,
                   :table_id 184,
                   :visibility_type :normal}
                  {:base_type :type/Decimal,
                   :coercion_strategy nil,
                   :description nil,
                   :display_name "Category ID",
                   :effective_type :type/Decimal,
                   :field_ref [:field 374 nil],
                   :fingerprint {:global {:distinct-count 28, :nil% 0.0}},
                   :id 374,
                   :name "category_id",
                   :parent_id nil,
                   :remapped_to "Category ID",
                   :semantic_type :type/FK,
                   :settings nil,
                   :source :fields,
                   :table_id 184,
                   :visibility_type :normal}
                  {:base_type :type/Text,
                   :description nil,
                   :display_name "Category ID",
                   :id nil,
                   :name "Category ID",
                   :remapped_from "category_id",
                   :remapped_to nil,
                   :semantic_type nil,
                   :table_id nil,
                   :target nil}],
           :rows [["20th Century Cafe" 12 "Café"]
                  ["25°" 11 "Burger"]
                  ["33 Taps" 7 "Bar"]
                  ["800 Degrees Neapolitan Pizzeria" 58 "Pizza"]]}
  actual: ({:cols [{:base_type :type/Text,
                    :coercion_strategy nil,
                    :description nil,
                    :display_name "Name",
                    :effective_type :type/Text,
                    :field_ref [:field 377 nil],
                    :fingerprint {:global {:distinct-count 100, :nil% 0.0},
                                  :type {:type/Text {:average-length 15.63,
                                                     :percent-email 0.0,
                                                     :percent-json 0.0,
                                                     :percent-state 0.0,
                                                     :percent-url 0.0}}},
                    :id 377,
                    :name "name",
                    :parent_id nil,
                    :semantic_type :type/Name,
                    :settings nil,
                    :source :fields,
                    :table_id 184,
                    :visibility_type :normal}
                   {:base_type :type/Decimal,
                    :coercion_strategy nil,
                    :description nil,
                    :display_name "Category ID",
                    :effective_type :type/Decimal,
                    :field_ref [:field 374 nil],
                    :fingerprint {:global {:distinct-count 28, :nil% 0.0}},
                    :id 374,
                    :name "category_id",
                    :parent_id nil,
                    :remapped_to "Category ID",
                    :semantic_type :type/FK,
                    :settings nil,
                    :source :fields,
                    :table_id 184,
                    :visibility_type :normal}
                   {:base_type :type/Text,
                    :description nil,
                    :display_name "Category ID",
                    :id nil,
                    :name "Category ID",
                    :remapped_from "category_id",
                    :remapped_to nil,
                    :semantic_type nil,
                    :table_id nil,
                    :target nil}],
            :rows [["20th Century Cafe" 12 nil]
                   ["25°" 11 nil]
                   ["33 Taps" 7 nil]
                   ["800 Degrees Neapolitan Pizzeria" 58 nil]]})
@kaklakariada kaklakariada added the bug Something isn't working label Dec 22, 2021
@kaklakariada kaklakariada added this to the GA milestone Dec 22, 2021
kaklakariada added a commit that referenced this issue Dec 22, 2021
@kaklakariada kaklakariada changed the title Fix failing remapping test Fix failing remapping tests Dec 22, 2021
kaklakariada added a commit that referenced this issue Dec 22, 2021
@kaklakariada kaklakariada removed this from the GA milestone Jan 18, 2022
kaklakariada added a commit that referenced this issue Feb 4, 2022
* #10 Consistently use DECIMAL data type for numbers

* Add test for DECIMAL with decimal places
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant