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

replace CAST with SAFE_CAST #6327

Merged
merged 1 commit into from
Oct 10, 2024
Merged

replace CAST with SAFE_CAST #6327

merged 1 commit into from
Oct 10, 2024

Conversation

m-d-bowerman
Copy link
Contributor

@m-d-bowerman m-d-bowerman commented Oct 10, 2024

Fixes ETL errors by replacing instances of CAST with SAFE_CAST

┆Issue is synchronized with this Jira Task

@dataops-ci-bot
Copy link

Integration report for "replace CAST with SAFE_CAST"

sql.diff

Click to expand!
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/newtab_visits_v1/query.sql /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/newtab_visits_v1/query.sql
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/newtab_visits_v1/query.sql	2024-10-10 17:25:04.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/telemetry_derived/newtab_visits_v1/query.sql	2024-10-10 17:24:51.000000000 +0000
@@ -60,14 +60,14 @@
     ANY_VALUE(
       IF(
         event_name = "opened",
-        CAST(mozfun.map.get_key(event_details, "window_inner_height") AS INT),
+        SAFE_CAST(mozfun.map.get_key(event_details, "window_inner_height") AS INT),
         NULL
       )
     ) AS newtab_window_inner_height,
     ANY_VALUE(
       IF(
         event_name = "opened",
-        CAST(mozfun.map.get_key(event_details, "window_inner_width") AS INT),
+        SAFE_CAST(mozfun.map.get_key(event_details, "window_inner_width") AS INT),
         NULL
       )
     ) AS newtab_window_inner_width,
@@ -272,7 +272,7 @@
       event_name = 'thumb_voting_interaction'
       AND mozfun.map.get_key(event_details, "thumbs_down") = "true"
     ) AS pocket_thumbs_down,
-    CAST(mozfun.map.get_key(event_details, "received_rank") AS INT) AS pocket_received_rank,
+    SAFE_CAST(mozfun.map.get_key(event_details, "received_rank") AS INT) AS pocket_received_rank,
     mozfun.map.get_key(
       event_details,
       "scheduled_corpus_item_id"

Link to full diff

@m-d-bowerman m-d-bowerman added this pull request to the merge queue Oct 10, 2024
Merged via the queue into main with commit e4ff38b Oct 10, 2024
20 of 21 checks passed
@m-d-bowerman m-d-bowerman deleted the fix_etl_error branch October 10, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants