Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
chrisknoll merged 1 commit into
masterfrom
issue-2187
Feb 23, 2023
Merged

chrisknoll merged 1 commit into
masterfrom
issue-2187

Conversation

@chrisknoll

Copy link
Copy Markdown
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
Copy Markdown
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

alondhe commented Feb 16, 2023

Copy link
Copy Markdown
Contributor

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

@chrisknoll

Copy link
Copy Markdown
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

@alondhe alondhe left a comment

Copy link
Copy Markdown
Contributor

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