Skip to content

Commit 370031e

Browse files
authored
GH-601: [Gandiva] Synchronize some methods on the Projector (#602)
### Rationale for this change Multiple threads can attempt to create the same llvm expression in Gandiva. This isn't allowed with the new JIT compiler, so synchronizing will prevent this scenario. ### What changes are included in this PR? Synchronize some methods to avoid adding duplicate llvm expressions. ### Are these changes tested? Yes, through unit tests in Gandiva. ### Are there any user-facing changes? No. Closes GH-601
1 parent 799d9fd commit 370031e

File tree

1 file changed

+2
-2
lines changed
  • gandiva/src/main/java/org/apache/arrow/gandiva/evaluator

1 file changed

+2
-2
lines changed

gandiva/src/main/java/org/apache/arrow/gandiva/evaluator/Projector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public static Projector make(
188188
* @param configurationId Custom configuration created through config builder.
189189
* @return A native evaluator object that can be used to invoke these projections on a RecordBatch
190190
*/
191-
public static Projector make(
191+
public static synchronized Projector make(
192192
Schema schema,
193193
List<ExpressionTree> exprs,
194194
SelectionVectorType selectionVectorType,
@@ -314,7 +314,7 @@ public void evaluate(
314314
outColumns);
315315
}
316316

317-
private void evaluate(
317+
private synchronized void evaluate(
318318
int numRows,
319319
List<ArrowBuf> buffers,
320320
List<ArrowBuffer> buffersLayout,

0 commit comments

Comments
 (0)