projjal commented on a change in pull request #11193:
URL: https://github.com/apache/arrow/pull/11193#discussion_r714698769



##########
File path: cpp/src/gandiva/cache.cc
##########
@@ -20,10 +20,10 @@
 
 namespace gandiva {
 
-static const int DEFAULT_CACHE_SIZE = 500;
+static const size_t DEFAULT_CACHE_SIZE = 128 * 1024 * 1024;  // 256 MiB
 
-int GetCapacity() {
-  int capacity;
+size_t GetCapacity() {
+  size_t capacity;
   const char* env_cache_size = std::getenv("GANDIVA_CACHE_SIZE");
   if (env_cache_size != nullptr) {
     capacity = std::atoi(env_cache_size);

Review comment:
       since it is calculating size it will be capped to int_max (2GB). Better 
to parse it as long.




-- 
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]


Reply via email to