You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After calling an arrow::compute::ScalarAggregationFunction, it returns a Datum object which contains a Scalar object. However, there's no value() method in the generated java wrapper to retrieve the underlying value, e.g. long/int, etc.
My code:
ArrowBufbuf; // this is an int64 ArrowBuf java object initialized in java// Below are all javacpp callsArrowBufferbuffer = newArrowBuffer(buf.nioBuffer(), capacity);
ExecContextcontext = newExecContext();
DataTypetype = int64();
PrimitiveArrayarray = newPrimitiveArray(type, capacity, buffer);
Functionfunc = context.func_registry().GetFunction("sum").ValueOrDie();
DatumVectorvector = newDatumVector(newDatum(array));
Scalars = func.Execute(vector, null, context).ValueOrDie().scalar();
// How can I retrieve the `long` value from the Scalar result object here? Haven't found such methods from either Scalar or Int64Scalar classes.
Please help advice. Thanks very much.
The text was updated successfully, but these errors were encountered:
Ah, sorry about that, I was confusing this with OpenCV. So, it looks like we need to use the internal API to access the data. Something like this should work:
Ah, sorry about that, I was confusing this with OpenCV. So, it looks like we need to use the internal API to access the data. Something like this should work:
After calling an arrow::compute::ScalarAggregationFunction, it returns a Datum object which contains a Scalar object. However, there's no value() method in the generated java wrapper to retrieve the underlying value, e.g. long/int, etc.
My code:
Please help advice. Thanks very much.
The text was updated successfully, but these errors were encountered: