/** * Used by UDF implementations (both Java code generated by {@link JavaBasedUDFunction} * and script executor {@link ScriptBasedUDFunction}) to convert the Java * object representation for the return value to the C* serialized representation. * * @param protocolVersion the native protocol version used for serialization */ protected ByteBuffer decompose(ProtocolVersion protocolVersion, Object value) { return decompose(returnCodec, protocolVersion, value); }
/** * Used by UDF implementations (both Java code generated by {@link JavaBasedUDFunction} * and script executor {@link ScriptBasedUDFunction}) to convert the Java * object representation for the return value to the C* serialized representation. * * @param protocolVersion the native protocol version used for serialization */ protected ByteBuffer decompose(ProtocolVersion protocolVersion, Object value) { return decompose(returnCodec, protocolVersion, value); }
protected ByteBuffer decompose(ProtocolVersion protocolVersion, Object value) { return UDFunction.decompose(returnCodec, protocolVersion, value); }
protected ByteBuffer decompose(ProtocolVersion protocolVersion, Object value) { return UDFunction.decompose(returnCodec, protocolVersion, value); }
/** * Used by UDF implementations (both Java code generated by {@link JavaBasedUDFunction} * and script executor {@link ScriptBasedUDFunction}) to convert the Java * object representation for the return value to the C* serialized representation. * * @param protocolVersion the native protocol version used for serialization */ protected ByteBuffer decompose(ProtocolVersion protocolVersion, Object value) { return decompose(returnCodec, protocolVersion, value); }
protected ByteBuffer decompose(ProtocolVersion protocolVersion, Object value) { return UDFunction.decompose(returnCodec, protocolVersion, value); }
public ByteBuffer compute(ProtocolVersion protocolVersion) throws InvalidRequestException { maybeInit(protocolVersion); // final function is traced in UDFunction Tracing.trace("Executed UDA {}: {} call(s) to state function {} in {}\u03bcs", name(), stateFunctionCount, stateFunction.name(), stateFunctionDuration); if (finalFunction == null) return UDFunction.decompose(stateTypeCodec, protocolVersion, state); if (finalFunction instanceof UDFunction) { UDFunction udf = (UDFunction)finalFunction; Object result = udf.executeForAggregate(protocolVersion, state, Collections.emptyList()); return UDFunction.decompose(returnTypeCodec, protocolVersion, result); } throw new UnsupportedOperationException("UDAs only support UDFs"); }
public ByteBuffer compute(ProtocolVersion protocolVersion) throws InvalidRequestException { maybeInit(protocolVersion); // final function is traced in UDFunction Tracing.trace("Executed UDA {}: {} call(s) to state function {} in {}\u03bcs", name(), stateFunctionCount, stateFunction.name(), stateFunctionDuration); if (finalFunction == null) return UDFunction.decompose(stateTypeCodec, protocolVersion, state); if (finalFunction instanceof UDFunction) { UDFunction udf = (UDFunction)finalFunction; Object result = udf.executeForAggregate(protocolVersion, state, Collections.emptyList()); return UDFunction.decompose(returnTypeCodec, protocolVersion, result); } throw new UnsupportedOperationException("UDAs only support UDFs"); }
public ByteBuffer compute(ProtocolVersion protocolVersion) throws InvalidRequestException { maybeInit(protocolVersion); // final function is traced in UDFunction Tracing.trace("Executed UDA {}: {} call(s) to state function {} in {}\u03bcs", name(), stateFunctionCount, stateFunction.name(), stateFunctionDuration); if (finalFunction == null) return UDFunction.decompose(stateTypeCodec, protocolVersion, state); if (finalFunction instanceof UDFunction) { UDFunction udf = (UDFunction)finalFunction; Object result = udf.executeForAggregate(protocolVersion, state, Collections.emptyList()); return UDFunction.decompose(returnTypeCodec, protocolVersion, result); } throw new UnsupportedOperationException("UDAs only support UDFs"); }