diff --git a/gandiva/src/main/java/org/apache/arrow/gandiva/evaluator/Filter.java b/gandiva/src/main/java/org/apache/arrow/gandiva/evaluator/Filter.java index f584564e09..6c8540cde8 100644 --- a/gandiva/src/main/java/org/apache/arrow/gandiva/evaluator/Filter.java +++ b/gandiva/src/main/java/org/apache/arrow/gandiva/evaluator/Filter.java @@ -111,7 +111,7 @@ public static Filter make(Schema schema, Condition condition, boolean optimize) * @param configurationId Custom configuration created through config builder. * @return A native evaluator object that can be used to invoke these projections on a RecordBatch */ - public static Filter make(Schema schema, Condition condition, long configurationId) + public static synchronized Filter make(Schema schema, Condition condition, long configurationId) throws GandivaException { // Invoke the JNI layer to create the LLVM module representing the filter. GandivaTypes.Condition conditionBuf = condition.toProtobuf(); @@ -158,7 +158,7 @@ public void evaluate(int numRows, List buffers, SelectionVector select evaluate(numRows, buffers, buffersLayout, selectionVector); } - private void evaluate( + private synchronized void evaluate( int numRows, List buffers, List buffersLayout,