js8544 commented on code in PR #14323:
URL: https://github.com/apache/arrow/pull/14323#discussion_r990722495


##########
java/gandiva/src/main/cpp/jni_common.cc:
##########
@@ -15,6 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include <arrow/status.h>

Review Comment:
   done



##########
java/gandiva/src/main/cpp/jni_common.cc:
##########
@@ -744,14 +733,29 @@ Status JavaResizableBuffer::Resize(const int64_t 
new_size, bool shrink_to_fit) {
 
   jlong ret_address = env_->GetLongField(ret, vector_expander_ret_address_);
   jlong ret_capacity = env_->GetLongField(ret, vector_expander_ret_capacity_);
-  DCHECK_GE(ret_capacity, new_size);
 
   data_ = reinterpret_cast<uint8_t*>(ret_address);
-  size_ = new_size;
   capacity_ = ret_capacity;
   return Status::OK();
 }
 
+Status JavaResizableBuffer::Resize(const int64_t new_size, bool shrink_to_fit) 
{
+  if (shrink_to_fit == true) {
+    return Status::NotImplemented("shrink not implemented");
+  }
+
+  if (ARROW_PREDICT_TRUE(new_size < capacity())) {

Review Comment:
   done



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