Closed r7kamura closed 8 months ago
I did a different approach with https://github.com/pennylane-hq/activerecord7-redshift-adapter/pull/8 by simply bypassing the limit extraction. It's not hard to do for just 3 types.
Thanks @r7kamura for raising this. In the end #8 was merged, so I think we can close this.
Thank you @jlebray for getting this adapter ready for activerecord 7.
Problem
I encountered a problem in our Rails app that WHERE clause is incorrectly generated when it takes a large integer value as a bigint type column value.
Here is an example test code to reproduce this problem:
and this results in:
Solution
After some investigation, I found that the
#extract_limit
was not rewritten correctly in https://github.com/pennylane-hq/activerecord7-redshift-adapter/pull/1.As you know,
#initialize_type_map
was rewritten to.initialize_type_map
in https://github.com/rails/rails/pull/42773. At this time,#extract_limit
was also rewritten to.extract_limit
. This change also had to be handled.This Pull Request fixes this problem.
With this change, the above test will succeed.