Switch isNumeric() to anayisID test when casting. - #2209
Conversation
|
@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. |
|
Thanks @chrisknoll -- will review here and deploy in our test environment by early next week. |
|
@alondhe, any results? |
alondhe
left a comment
There was a problem hiding this comment.
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.
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_idto 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.