Skip to content

Commit ea1d516

Browse files
committed
Update doc
1 parent 4200370 commit ea1d516

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/StardustDocs/topics/write.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ Dataframe supports writing [Arrow interprocess streaming format](https://arrow.a
133133
and [Arrow random access format](https://arrow.apache.org/docs/java/ipc.html#writing-and-reading-random-access-files)
134134
to raw WritableByteChannel, OutputStream, File or ByteArray.
135135

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).
138138

139-
First is quite easy:
139+
The first approach is quite easy:
140140
<!---FUN writeArrowFile-->
141141

142142
```kotlin
@@ -158,7 +158,7 @@ val featherByteArray: ByteArray = df.saveArrowFeatherToByteArray()
158158
<!---END-->
159159
(creating byte array). Nested frames and columns with mixed or unsupported types will be saved as String.
160160

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.
162162
Behavior `Mode` has four independent switchers: `restrictWidening`, `restrictNarrowing`, `strictType`, `strictNullable`.
163163
You can use `Mode.STRICT` (this is default), `Mode.LOYAL` or any combination you want.
164164
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(
182182
strictType = true,
183183
strictNullable = false
184184
),
185-
// Specify warning subscriber
186-
writeWarningMessage
185+
// Specify mismatch subscriber
186+
writeMismatchMessage
187187
).use { writer ->
188188
// Save to any format and sink, like in previous example
189189
writer.writeArrowFeather(file)

0 commit comments

Comments
 (0)