Skip to content

Commit 02d76f8

Browse files
committed
Move read functions into DataFrame.Companion scope for discoverability
1 parent b170122 commit 02d76f8

File tree

1 file changed

+2
-2
lines changed
  • dataframe-arrow/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io

1 file changed

+2
-2
lines changed

dataframe-arrow/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/arrow.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ internal object Allocator {
7878
/**
7979
* Read [Arrow interprocess streaming format](https://arrow.apache.org/docs/java/ipc.html#writing-and-reading-streaming-format) data from existing [channel]
8080
*/
81-
public fun readArrowIPC(channel: ReadableByteChannel, allocator: RootAllocator = Allocator.ROOT): AnyFrame {
81+
public fun DataFrame.Companion.readArrowIPC(channel: ReadableByteChannel, allocator: RootAllocator = Allocator.ROOT): AnyFrame {
8282
ArrowStreamReader(channel, allocator).use { reader ->
8383
val dfs = buildList {
8484
val root = reader.vectorSchemaRoot
@@ -95,7 +95,7 @@ public fun readArrowIPC(channel: ReadableByteChannel, allocator: RootAllocator =
9595
/**
9696
* Read [Arrow random access format](https://arrow.apache.org/docs/java/ipc.html#writing-and-reading-random-access-files) data from existing [channel]
9797
*/
98-
public fun readArrowFeather(channel: SeekableByteChannel, allocator: RootAllocator = Allocator.ROOT): AnyFrame {
98+
public fun DataFrame.Companion.readArrowFeather(channel: SeekableByteChannel, allocator: RootAllocator = Allocator.ROOT): AnyFrame {
9999
ArrowFileReader(channel, allocator).use { reader ->
100100
val dfs = buildList {
101101
reader.recordBlocks.forEach { block ->

0 commit comments

Comments
 (0)