You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hop.apache.org by "maxbobse (via GitHub)" <gi...@apache.org> on 2025/12/08 20:57:20 UTC

[PR] Enhance calculator documentation with division warning (hop)

maxbobse opened a new pull request, #6149:
URL: https://github.com/apache/hop/pull/6149

   Addresses #6110, added a warning about division by zero when using Integer and Number types.
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   - [ ] Run `mvn clean install apache-rat:check` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
   - [ ] If you have a group of commits related to the same change, please squash your commits into one and force push your branch using `git rebase -i`.
   - [x] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable.
   
   To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
   - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enhance calculator documentation with division warning (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva commented on PR #6149:
URL: https://github.com/apache/hop/pull/6149#issuecomment-3629041268

   I think both your columns were integers in this case, so I do not think this documentation change is correct.
   what does happen is when number A is an integer and number B isn't the result will still be an Integer (whole) number.
   It won't magically become a number. I would have to double check but It follows the rules of precision too. if you have 2 numbers and number A has a 2 digit percision and number B has 4 digit precision the result will remain 2 digit precision.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enhance calculator documentation with division warning (hop)

Posted by "mattcasters (via GitHub)" <gi...@apache.org>.
mattcasters merged PR #6149:
URL: https://github.com/apache/hop/pull/6149


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enhance calculator documentation with division warning (hop)

Posted by "mattcasters (via GitHub)" <gi...@apache.org>.
mattcasters commented on PR #6149:
URL: https://github.com/apache/hop/pull/6149#issuecomment-3656392187

   It's mentioned at the bottom of the FAQ that the data type of the left hand side argument is the driving factor:
   
   https://hop.apache.org/manual/latest/pipeline/transforms/calculator.html#_faq_on_length_and_precision_and_data_types_affecting_the_results
   
   It's not ideal, for sure, but historically that's the way it works.  We can change this of-course, with enough patience and care for compatibility.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enhance calculator documentation with division warning (hop)

Posted by "maxbobse (via GitHub)" <gi...@apache.org>.
maxbobse commented on PR #6149:
URL: https://github.com/apache/hop/pull/6149#issuecomment-3659771638

   I don't believe the functionality itself needs to be changed - that is fine the way it works. The documentation update is more about creating awareness what to look out for when using that specific operation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enhance calculator documentation with division warning (hop)

Posted by "maxbobse (via GitHub)" <gi...@apache.org>.
maxbobse commented on PR #6149:
URL: https://github.com/apache/hop/pull/6149#issuecomment-3629176670

   I have tested it here with Integer/Double as input and that lead to exactly that issue. And in my bug report I reported the same
   
   <img width="563" height="305" alt="image" src="https://github.com/user-attachments/assets/e2821f8b-391f-4914-be30-dd055d3c50be" />
   
   <img width="648" height="134" alt="image" src="https://github.com/user-attachments/assets/56947cc6-da64-4e71-acd7-ab3209a0bb0b" />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org