Package org.apache.datafusion
Record Class ScalarFunctionArgs
java.lang.Object
java.lang.Record
org.apache.datafusion.ScalarFunctionArgs
Bundle of inputs passed to
ScalarFunction.evaluate(org.apache.arrow.memory.BufferAllocator, org.apache.datafusion.ScalarFunctionArgs): the per-arg ColumnarValues
(in declared order) and the batch row count DataFusion is driving.
Mirrors DataFusion's datafusion::logical_expr::ScalarFunctionArgs. rowCount is
the only channel by which an array-returning UDF without array-typed inputs (all-scalar args, or
nullary) can size its output. Nullary UDFs that prefer to broadcast a single value should return
ColumnarValue.scalar(...)
instead, which removes the need to consult rowCount.
-
Constructor Summary
ConstructorsConstructorDescriptionScalarFunctionArgs(List<ColumnarValue> args, int rowCount) Creates an instance of aScalarFunctionArgsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionargs()Returns the value of theargsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.introwCount()Returns the value of therowCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScalarFunctionArgs
Creates an instance of aScalarFunctionArgsrecord class.- Parameters:
args- the value for theargsrecord componentrowCount- the value for therowCountrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
args
Returns the value of theargsrecord component.- Returns:
- the value of the
argsrecord component
-
rowCount
public int rowCount()Returns the value of therowCountrecord component.- Returns:
- the value of the
rowCountrecord component
-