niyue commented on code in PR #40031:
URL: https://github.com/apache/arrow/pull/40031#discussion_r1485751279
##########
cpp/src/gandiva/engine.h:
##########
@@ -57,12 +62,12 @@ class GANDIVA_EXPORT Engine {
///
/// \param[in] config the engine configuration
/// \param[in] cached flag to mark if the module is already compiled and
cached
- /// \param[in] object_cache an optional object_cache used for building the
module
+ /// \param[in] object_cache an optional object_cache used for building the
module, if
+ /// not provided, no caching is done
/// \return arrow::Result containing the created engine
static Result<std::unique_ptr<Engine>> Make(
const std::shared_ptr<Configuration>& config, bool cached,
- std::optional<std::reference_wrapper<GandivaObjectCache>> object_cache =
- std::nullopt);
+ std::optional<llvm::ObjectCache*> object_cache = std::nullopt);
Review Comment:
Initially I used `nullptr` as the default value, however, [linter in CI
check](https://github.com/apache/arrow/actions/runs/7867054169/job/21462175677?pr=40031)
reported:
```
File /arrow/cpp/src/gandiva/engine.h failed C++/CLI lint check: Uses nullptr
Line 69: llvm::ObjectCache* object_cache = nullptr);
```
I am not sure how this is expected to be fixed for this lint rule, and now
replaced it with an `std::optional`, let me know if it should be fixed in
another way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]