Package-level declarations

Types

Link copied to clipboard
internal object Allocator
Link copied to clipboard
Link copied to clipboard

Save dataFrame content in Apache Arrow format (can be written to File, ByteArray, OutputStream or raw Channel) with targetSchema. If dataFrame content does not match targetSchema, the behaviour is specified by mode, and mismatches would be sent to mismatchSubscriber

Link copied to clipboard
internal class ArrowWriterImpl(val dataFrame: DataFrame<*>, val targetSchema: Schema, val mode: ArrowWriter.Mode, val mismatchSubscriber: (ConvertingMismatch) -> Unit = ignoreMismatchMessage) : ArrowWriter

Save dataFrame content in Apache Arrow format (can be written to File, ByteArray, OutputStream or raw Channel) with targetSchema. If dataFrame content does not match with targetSchema, behaviour is specified by mode, mismatches would be sent to mismatchSubscriber

Link copied to clipboard
Link copied to clipboard
sealed class ConvertingMismatch(val column: String, val row: Int?, val cause: Exception?)

Detailed message about any mismatch when saving to Arrow format with a user-defined schema that does not match the actual data. Can be sent to a callback, written to a log, or wrapped in an exception

Properties

Link copied to clipboard

Number of rows readParquet pulls from Arrow Dataset per scan batch, when no batchSize is given.

Link copied to clipboard
internal val DEFAULT_INSTANT_UNIT: TimeUnit

The precision an Instant column is written with when no target Schema is supplied.

Link copied to clipboard

kotlinx.datetime.Instant is superseded by kotlin.time.Instant but still resolvable, so columns holding it are mapped too. Kept in a val to keep the deprecation suppression off the whole when. See issue #1350.

Link copied to clipboard
Link copied to clipboard
internal const val NANOS_PER_SECOND: Long
Link copied to clipboard
Link copied to clipboard
internal val TimeUnit.perSecond: Long

How many of these units fit into one second.

Functions

Link copied to clipboard

Create ArrowWriter for this DataFrame with target schema matching actual data

fun AnyFrame.arrowWriter(targetSchema: Schema, mode: ArrowWriter.Mode = ArrowWriter.Mode.STRICT, mismatchSubscriber: (ConvertingMismatch) -> Unit = ignoreMismatchMessage): ArrowWriter

Create ArrowWriter for this DataFrame with explicit targetSchema. If DataFrame does not match with targetSchema, behaviour is specified by mode, mismatches would be sent to mismatchSubscriber

Link copied to clipboard

same as Iterable>.concat() without internal type guessing (all batches should have the same schema)

Link copied to clipboard
internal fun nothingType(nullable: Boolean): KType
Link copied to clipboard
fun DataFrame.Companion.readArrow(reader: ArrowReader, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow any format data from existing reader

Link copied to clipboard
internal fun DataFrame.Companion.readArrowDatasetImpl(fileUris: Array<String>, fileFormat: FileFormat, nullability: NullabilityOptions = NullabilityOptions.Infer, batchSize: Long = ARROW_PARQUET_DEFAULT_BATCH_SIZE): AnyFrame
Link copied to clipboard
fun DataFrame.Companion.readArrowFeather(file: File, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow random access format data from existing file

fun DataFrame.Companion.readArrowFeather(stream: InputStream, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow random access format data from existing stream

fun DataFrame.Companion.readArrowFeather(url: URL, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow random access format data from existing url

fun DataFrame.Companion.readArrowFeather(path: Path, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow random access format data from an existing file on the given path.

fun DataFrame.Companion.readArrowFeather(byteArray: ByteArray, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow random access format data from existing byteArray

fun DataFrame.Companion.readArrowFeather(path: String, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow random access format data from existing path

fun DataFrame.Companion.readArrowFeather(channel: SeekableByteChannel, allocator: RootAllocator = Allocator.ROOT, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow random access format data from existing channel

Link copied to clipboard
internal fun DataFrame.Companion.readArrowFeatherImpl(channel: SeekableByteChannel, allocator: RootAllocator = Allocator.ROOT, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow random access format data from existing channel

Link copied to clipboard
internal fun DataFrame.Companion.readArrowImpl(reader: ArrowReader, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow any format data from existing reader

Link copied to clipboard
fun DataFrame.Companion.readArrowIPC(file: File, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame
fun DataFrame.Companion.readArrowIPC(stream: InputStream, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame
fun DataFrame.Companion.readArrowIPC(url: URL, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame
fun DataFrame.Companion.readArrowIPC(path: Path, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow interprocess streaming format data from existing file on the given path.

fun DataFrame.Companion.readArrowIPC(byteArray: ByteArray, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame
fun DataFrame.Companion.readArrowIPC(path: String, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow interprocess streaming format data from the file or URL at path.

fun DataFrame.Companion.readArrowIPC(channel: ReadableByteChannel, allocator: RootAllocator = Allocator.ROOT, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame
Link copied to clipboard
internal fun DataFrame.Companion.readArrowIPCImpl(channel: ReadableByteChannel, allocator: RootAllocator = Allocator.ROOT, nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame
Link copied to clipboard
fun DataFrame.Companion.readParquet(vararg files: File, nullability: NullabilityOptions = NullabilityOptions.Infer, batchSize: Long = ARROW_PARQUET_DEFAULT_BATCH_SIZE): AnyFrame

Read Parquet data from existing files by using Arrow Dataset

fun DataFrame.Companion.readParquet(vararg urls: URL, nullability: NullabilityOptions = NullabilityOptions.Infer, batchSize: Long = ARROW_PARQUET_DEFAULT_BATCH_SIZE): AnyFrame

Read Parquet data from existing urls by using Arrow Dataset

fun DataFrame.Companion.readParquet(vararg paths: Path, nullability: NullabilityOptions = NullabilityOptions.Infer, batchSize: Long = ARROW_PARQUET_DEFAULT_BATCH_SIZE): AnyFrame

Read Parquet data from existing paths by using Arrow Dataset

fun DataFrame.Companion.readParquet(vararg strUrls: String, nullability: NullabilityOptions = NullabilityOptions.Infer, batchSize: Long = ARROW_PARQUET_DEFAULT_BATCH_SIZE): AnyFrame

Read Parquet data from existing strUrls by using Arrow Dataset

Link copied to clipboard
fun DataColumn<*>.toArrowField(mismatchSubscriber: (ConvertingMismatch) -> Unit = ignoreMismatchMessage): Field

Create Arrow Field (note: this is part of Schema, does not contain data itself) that has the same name, type and nullability as this

internal fun KType.toArrowField(name: String, mismatchSubscriber: (ConvertingMismatch) -> Unit): Field
internal fun ColumnSchema.toArrowField(name: String, mismatchSubscriber: (ConvertingMismatch) -> Unit): Field
Link copied to clipboard
fun List<DataColumn<*>>.toArrowSchema(mismatchSubscriber: (ConvertingMismatch) -> Unit = ignoreMismatchMessage): Schema

Create Arrow Schema matching this actual data. Columns with not supported types will be interpreted as String

Link copied to clipboard
fun ArrowReader.toDataFrame(nullability: NullabilityOptions = NullabilityOptions.Infer): AnyFrame

Read Arrow any format data from existing ArrowReader

Link copied to clipboard

Save data to Arrow random access format, write to new or existing file. If file exists, it would be recreated.

Save data to Arrow random access format, write to opened stream.

Save data to Arrow random access format, write to opened channel.

Save data to Arrow random access format, write to new or existing file on the given path. If file exists, it would be recreated.

Link copied to clipboard

Save data to Arrow interprocess streaming format, write to opened stream.

Save data to Arrow interprocess streaming format, write to opened channel.

fun AnyFrame.writeArrowIPC(file: File, append: Boolean = true)

Save data to Arrow interprocess streaming format, write to new or existing file. If file exists, it can be recreated or expanded.

fun AnyFrame.writeArrowIPC(path: Path, append: Boolean = true)

Save data to Arrow interprocess streaming format, write to new or existing file on the given path. If file exists, it can be recreated or expanded.