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

[Python] [Gandiva] Check parameters are not None

    XMLWordPrintableJSON

Details

    Description

      Most of the functions in Gandiva's Python Expression builder interface current accept None in their arguments, but will segfault once they are used.

      Example:

      import pyarrow
      import pyarrow.gandiva as gandiva
      
      builder = gandiva.TreeExprBuilder()
      field = pyarrow.field('whatever', type=pyarrow.date64())
      date_col = builder.make_field(field)
      
      func = builder.make_function('less_than_or_equal_to', [date_col, None], pyarrow.bool_())
      
      condition = builder.make_condition(func)
      
      # Will segfault on this line:
      gandiva.make_filter(pyarrow.schema([field]), condition)
      

      I think this is just a matter of adding not None to the appropriate function arguments.

      Attachments

        Issue Links

          Activity

            People

              wjones127 Will Jones
              wjones127 Will Jones
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 50m
                  1h 50m