HyukjinKwon commented on code in PR #59934:
URL: https://github.com/apache/spark/pull/59934#discussion_r4461789445
##########
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/v2/ffi/NativeLibrary.java:
##########
@@ -853,7 +1133,10 @@ private static byte[] readCString(long address) {
/**
* The {@code SparkDsTaskContext} of a task that reads a partition or writes
data. The reader or
Review Comment:
Done in 77bf7bd: "Whether the library should stop reading or writing with
each SparkDsTaskContext, which is_interrupted answers, by the address of the
struct."
##########
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/v2/ffi/NativeLibrary.java:
##########
@@ -347,10 +467,33 @@ private static final class Ffm {
lookup.findStatic(NativeLibrary.class, "sink",
MethodType.methodType(void.class, long.class, long.class,
long.class)),
C.VOID, C.PTR, C.PTR, C.I64);
+ STATE_SINK = upcall(
+ lookup.findStatic(NativeLibrary.class, "stateSink",
+ MethodType.methodType(void.class, long.class, long.class,
long.class)),
+ C.VOID, C.PTR, C.PTR, C.I64);
IS_INTERRUPTED = upcall(
lookup.findStatic(NativeLibrary.class, "isInterrupted",
MethodType.methodType(boolean.class, long.class)),
C.BOOL, C.PTR);
+ ENGINE_STREAM_GET_SCHEMA = upcall(
Review Comment:
Done in 77bf7bd: the four upcall stubs and the three downcall handles are in
a holder class, `EngineStreamCallbacks`, in the section of the streams of
engines, which is initialized when the first stream is wrapped. A failure to
create them only fails the streams of engines.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]