-
Notifications
You must be signed in to change notification settings - Fork 169
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
Return long value from int filter if over max int length. #315
Conversation
Codecov Report
@@ Coverage Diff @@
## master #315 +/- ##
============================================
+ Coverage 71.26% 71.28% +0.01%
- Complexity 1559 1561 +2
============================================
Files 239 239
Lines 4907 4910 +3
Branches 790 790
============================================
+ Hits 3497 3500 +3
Misses 1127 1127
Partials 283 283
Continue to review full report at Codecov.
|
would there be harm in always returning a |
Not sure what the implications are for always returning |
Filters/functions that don't do type conversions (i.e. advanced filters) may be affected by always returning a long. |
I'd say it would be more likely to create problems if the returned type varies by input. Users won't expect they'll sometimes get longs. |
I am going to fix type conversion in a few other places then make this always return long. |
The only issue I can think of is if you explicitly check for the type: |
Int is unbounded in python so trying to come up with a solution to bring Jinjava
|int
closer to parity with Jinja. Here we are returning a long value instead of a int if the value is above the maximum allowed for ints. This should fix most issues where people are trying to convert long IDs into numbers using the|int
filter. Some thought is needed to figure out a better long term solution for higher values than what long supports.