code: def test_filter():
      import pyarrow.gandiva as gandiva
  
      table = pa.Table.from_arrays(
          [pa.array([1.0 * i for i in range(10000)])], ["a"]
      )
  
      builder = gandiva.TreeExprBuilder()
      node_a = builder.make_field(table.schema.field("a"))
      thousand = builder.make_literal(1000.0, pa.float64())
      cond = builder.make_function(
          "less_than", [node_a, thousand], pa.bool_()
      )
      condition = builder.make_condition(cond)
  
      assert condition.result().type == pa.bool_()
  
      config = gandiva.Configuration(dump_ir=True)
      filter = gandiva.make_filter(table.schema, condition, config)
      # Gandiva generates compute kernel function named `@expr_X`
      assert filter.llvm_ir.find("@expr_") != -1
  
      result = filter.evaluate(
          table.to_batches()[0], pa.default_memory_pool()
      )
      assert result.to_array().equals(
          pa.array(range(1000), type=pa.uint32())
      )
  
file_path: arrow/python/pyarrow/tests/test_gandiva.py
imports: import datetime
  import pytest
  import pyarrow
label_desc: Use image node_id 3 for calling a global function with example usage: test_filter() without return types