I used the test case in https://github.com/apache/arrow/blob/master/python/pyarrow/tests/test_gandiva.py#L25, and found an issue when I was using the slice operator input_batch[1:]. It seems that the offset is ignored in the Gandiva projector.
If we use the full record batch input_batch, the expected output is [10, 15, 15, 17]. So if we use input_batch[1:], the expected output should be [15, 15, 17], however this script returned [10, 15, 15]. It seems that the projector ignores the offset and always reads from 0.
A corresponding issue is created in GitHub as well https://github.com/apache/arrow/issues/4420