Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-3487

[Gandiva] simplify NULL_IF_NULL functions that can return errors

    Details

      Description

      NULL_IF_NULL functions that can return errors eg. divide currently look at the validity bits in each function (to avoid returning spurious errors).

       

      divide(TYPE in1, boolean is_valid1, TYPE in2, boolean is_valid2, ..) {
          if (!is_valid1 || !is_valid2) { 
            return 0;
          }
          if (in2 == 0) { /* set error */ }
      }
      

       

      This validity check is duplicated for multiple functions and should be moved to the common layer (for all NULL_IF_NULL functions that can return error).

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pravindra Pindikura Ravindra
                Reporter:
                pravindra Pindikura Ravindra
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m