From fdc8d9d68f5d0a7bc71447d6f15e162464738b43 Mon Sep 17 00:00:00 2001 From: Hongze Zhang Date: Thu, 10 Mar 2022 15:56:01 +0800 Subject: [PATCH] 7.0.0: Regression on random function --- cpp/src/gandiva/projector.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/gandiva/projector.cc b/cpp/src/gandiva/projector.cc index 3eebcc7b6fc83..9bc4df665feae 100644 --- a/cpp/src/gandiva/projector.cc +++ b/cpp/src/gandiva/projector.cc @@ -103,11 +103,11 @@ Status Projector::Make(SchemaPtr schema, const ExpressionVector& exprs, output_fields.push_back(expr->result()); } - // For statful projection, we should not cache it. - if (cache_key.ToString().find(" rand(") == std::string::npos) { // Instantiate the projector with the completely built llvm generator *projector = std::shared_ptr( new Projector(std::move(llvm_gen), schema, output_fields, configuration)); + // For statful projection, we should not cache it. + if (cache_key.ToString().find(" rand(") == std::string::npos) { projector->get()->SetBuiltFromCache(llvm_flag); }