You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and [Arrow random access format](https://arrow.apache.org/docs/java/ipc.html#writing-and-reading-random-access-files)
134
134
to raw WritableByteChannel, OutputStream, File or ByteArray.
135
135
136
-
Data may be saved "as is" or converted to match some target [Schema](https://arrow.apache.org/docs/java/reference/org/apache/arrow/vector/types/pojo/Schema.html)
137
-
if you have it.
136
+
Data may be saved "as is" (like exporting to new Excel file) or converted to match some target [Schema](https://arrow.apache.org/docs/java/reference/org/apache/arrow/vector/types/pojo/Schema.html)
137
+
if you have it (like inserting into existing SQL table).
138
138
139
-
First is quite easy:
139
+
The first approach is quite easy:
140
140
<!---FUN writeArrowFile-->
141
141
142
142
```kotlin
@@ -158,7 +158,7 @@ val featherByteArray: ByteArray = df.saveArrowFeatherToByteArray()
158
158
<!---END-->
159
159
(creating byte array). Nested frames and columns with mixed or unsupported types will be saved as String.
160
160
161
-
Second is a bit more tricky. You have to create specify schema itself and casting behavior mode as `ArrowWriter` parameters.
161
+
The second approach is a bit more tricky. You have to specify schema itself and casting behavior mode as `ArrowWriter` parameters.
162
162
Behavior `Mode` has four independent switchers: `restrictWidening`, `restrictNarrowing`, `strictType`, `strictNullable`.
163
163
You can use `Mode.STRICT` (this is default), `Mode.LOYAL` or any combination you want.
164
164
The `ArrowWriter` object should be closed after using because Arrow uses random access buffers not managed by Java GC.
@@ -182,8 +182,8 @@ df.arrowWriter(
182
182
strictType =true,
183
183
strictNullable =false
184
184
),
185
-
// Specify warning subscriber
186
-
writeWarningMessage
185
+
// Specify mismatch subscriber
186
+
writeMismatchMessage
187
187
).use { writer ->
188
188
// Save to any format and sink, like in previous example
0 commit comments