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

Switch isNumeric() to anayisID test when casting. #2209

Merged
merged 1 commit into from
Feb 23, 2023
Merged

Conversation

chrisknoll
Copy link
Collaborator

Fixes #2187.

These changes span a large number of files. I did not change any files related to heracles reports (these should probably be deprecated).

The general strategy is moving away from isNumeric() and instead depending on the record's analysis_id to determine how the casting should perform. The problem with isNumeric() is that numeric values like '123.45' were passign the isNumeric() test, but can not be casted to an integer. By using analysis_id you can be certain that the cast you are doing is appropriate to the analysis that generated the record.

@chrisknoll
Copy link
Collaborator Author

@alondhe , this PR is in draft so that you can test this branch in your own env. If it works for you, we'll make it a formal PR.

@alondhe
Copy link
Contributor

alondhe commented Feb 16, 2023

Thanks @chrisknoll -- will review here and deploy in our test environment by early next week.

@chrisknoll
Copy link
Collaborator Author

@alondhe, any results?

@alondhe alondhe self-requested a review February 22, 2023 22:41
@alondhe alondhe marked this pull request as ready for review February 22, 2023 22:41
Copy link
Contributor

@alondhe alondhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, @chrisknoll! Been fighting with our tech stack and OS permissions.

I tested by re-inserting our benchmark records into achilles_results and achilles_results_dist. In Atlas 2.12.1, the drilldowns throughout each domain would error out with the Redshift error I described.

Using this branch, I tried the same tests and never came across the Redshift errors. I also checked that the values from the Achilles tables match what's in the report.

@chrisknoll chrisknoll merged commit 250ed05 into master Feb 23, 2023
@delete-merged-branch delete-merged-branch bot deleted the issue-2187 branch February 23, 2023 03:59
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.

Drilldown Reports cast issue
2 participants