@@ -94,8 +94,11 @@ class GANDIVA_EXPORT Engine {
9494 llvm::Constant* CreateGlobalStringPtr (const std::string& string);
9595
9696 Status Init (std::unordered_set<std::string> function_names);
97+ Status Init ();
9798
9899 private:
100+ friend class ExternalCFunctions ;
101+
99102 Engine (const std::shared_ptr<Configuration>& conf,
100103 std::unique_ptr<llvm::orc::LLJIT> lljit,
101104 std::shared_ptr<llvm::TargetMachine> target_machine, bool cached);
@@ -127,27 +130,28 @@ class GANDIVA_EXPORT Engine {
127130 std::unordered_set<std::string> used_functions_;
128131
129132 static inline const std::unordered_set<std::string> internal_functions_ = {
130- " gdv_fn_context_arena_malloc" ,
131- " gdv_fn_context_set_error_msg" ,
132- " gdv_fn_populate_varlen_vector" ,
133- " gdv_fn_context_arena_reset" ,
134- " gdv_fn_in_expr_lookup_int32" ,
135- " gdv_fn_in_expr_lookup_int64" ,
136- " gdv_fn_in_expr_lookup_float" ,
137- " gdv_fn_in_expr_lookup_double" ,
138- " gdv_fn_in_expr_lookup_decimal" ,
139- " gdv_fn_in_expr_lookup_utf8" ,
140-
141- " bitMapGetBit" ,
142- " bitMapSetBit" ,
143- " bitMapValidityGetBit" ,
144- " bitMapClearBitIfFalse" ,
133+ " gdv_fn_context_arena_malloc" ,
134+ " gdv_fn_context_set_error_msg" ,
135+ " gdv_fn_populate_varlen_vector" ,
136+ " gdv_fn_context_arena_reset" ,
137+ " gdv_fn_in_expr_lookup_int32" ,
138+ " gdv_fn_in_expr_lookup_int64" ,
139+ " gdv_fn_in_expr_lookup_float" ,
140+ " gdv_fn_in_expr_lookup_double" ,
141+ " gdv_fn_in_expr_lookup_decimal" ,
142+ " gdv_fn_in_expr_lookup_utf8" ,
143+
144+ " bitMapGetBit" ,
145+ " bitMapSetBit" ,
146+ " bitMapValidityGetBit" ,
147+ " bitMapClearBitIfFalse" ,
145148 };
146149
147150 bool optimize_ = true ;
148151 bool module_finalized_ = false ;
149152 bool cached_;
150153 bool functions_loaded_ = false ;
154+ bool selective_mapping_enabled_ = false ;
151155 std::shared_ptr<FunctionRegistry> function_registry_;
152156 std::string module_ir_;
153157 // The lifetime of the TargetMachine is shared with LLJIT. This prevents unnecessary
0 commit comments