Class NativeScan

java.lang.Object
dev.vortex.jni.NativeScan

public final class NativeScan extends Object
JNI boundary for Scan.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    arrowSchema(long pointer, long schemaAddress)
    Export the scan's schema into the Arrow C Data Interface struct at schemaAddress.
    static long
    create(long dataSourcePointer, long projectionPointer, long filterPointer, long rowRangeBegin, long rowRangeEnd, long[] selectionIndices, byte selectionInclude, long limit, boolean ordered)
    Create a new scan from a data source.
    static void
    free(long pointer)
    Free a scan pointer.
    static long
    nextPartition(long pointer)
    Advance the scan and return the next partition pointer.
    static void
    partitionCount(long pointer, long[] out)
    Fill out with [count, cardinality].

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static long create(long dataSourcePointer, long projectionPointer, long filterPointer, long rowRangeBegin, long rowRangeEnd, long[] selectionIndices, byte selectionInclude, long limit, boolean ordered)
      Create a new scan from a data source. The scan is lazy: no I/O happens until nextPartition(long) is called.
      Parameters:
      dataSourcePointer - pointer from NativeDataSource.open(long, java.lang.String[], java.util.Map<java.lang.String, java.lang.String>)
      projectionPointer - native expression pointer, or 0 for "all columns"
      filterPointer - native filter expression pointer, or 0 for "no filter"
      rowRangeBegin - inclusive start of the row range, 0 for "unbounded"
      rowRangeEnd - exclusive end of the row range, 0 for "unbounded"
      selectionIndices - sorted row indices; may be null
      selectionInclude - 0 (all), 1 (include selectionIndices), 2 (exclude selectionIndices)
      limit - max rows to return, or 0 for "no limit"
      ordered - true to preserve row order across partitions
    • free

      public static void free(long pointer)
      Free a scan pointer.
    • arrowSchema

      public static void arrowSchema(long pointer, long schemaAddress)
      Export the scan's schema into the Arrow C Data Interface struct at schemaAddress.
    • partitionCount

      public static void partitionCount(long pointer, long[] out)
      Fill out with [count, cardinality].
    • nextPartition

      public static long nextPartition(long pointer)
      Advance the scan and return the next partition pointer. Returns 0 when exhausted.