Skip to content

Commit d2cc199

Browse files
kouwesm
authored andcommitted
ARROW-1062: [GLib] Follow API changes in examples
Author: Kouhei Sutou <[email protected]> Closes #709 from kou/glib-fix-examples and squashes the following commits: ed5c465 [Kouhei Sutou] [GLib] Follow API changes in examples
1 parent b06602d commit d2cc199

14 files changed

+56
-15
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ addons:
1717
- gtk-doc-tools
1818
- autoconf-archive
1919
- libgirepository1.0-dev
20+
- gir1.2-gudev-1.0
2021
services:
2122
- docker
2223

c_glib/arrow-glib/table.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,4 @@ GArrowTable *garrow_table_remove_column (GArrowTable *table,
8686
guint i,
8787
GError **error);
8888

89-
gchar *garrow_table_to_string (GArrowTable *table);
90-
9189
G_END_DECLS

c_glib/example/go/read-batch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func main() {
8282
if err != nil {
8383
log.Fatalf("Failed to open path: <%s>: %v", path, err)
8484
}
85-
reader, err := arrow.NewFileReader(input)
85+
reader, err := arrow.NewRecordBatchFileReader(input)
8686
if err != nil {
8787
log.Fatalf("Failed to parse data: %v", err)
8888
}

c_glib/example/go/read-stream.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func main() {
8282
if err != nil {
8383
log.Fatalf("Failed to open path: <%s>: %v", path, err)
8484
}
85-
reader, err := arrow.NewStreamReader(input)
85+
reader, err := arrow.NewRecordBatchStreamReader(input)
8686
if err != nil {
8787
log.Fatalf("Failed to parse data: %v", err)
8888
}

c_glib/example/go/write-batch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func main() {
130130
if err != nil {
131131
log.Fatalf("Failed to open path: <%s>: %v", output_path, err)
132132
}
133-
writer, err := arrow.NewFileWriter(output, schema)
133+
writer, err := arrow.NewRecordBatchFileWriter(output, schema)
134134
if err != nil {
135135
log.Fatalf("Failed to create writer: %v", err)
136136
}

c_glib/example/go/write-stream.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func main() {
130130
if err != nil {
131131
log.Fatalf("Failed to open path: <%s>: %v", output_path, err)
132132
}
133-
writer, err := arrow.NewStreamWriter(output, schema)
133+
writer, err := arrow.NewRecordBatchStreamWriter(output, schema)
134134
if err != nil {
135135
log.Fatalf("Failed to create writer: %v", err)
136136
}

c_glib/example/lua/read-batch.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ local Arrow = lgi.Arrow
2121
local input_path = arg[1] or "/tmp/batch.arrow";
2222

2323
local input = Arrow.MemoryMappedInputStream.new(input_path)
24-
local reader = Arrow.FileReader.new(input)
24+
local reader = Arrow.RecordBatchFileReader.new(input)
2525

2626
for i = 0, reader:get_n_record_batches() - 1 do
2727
local record_batch = reader:get_record_batch(i)

c_glib/example/lua/read-stream.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ local Arrow = lgi.Arrow
2121
local input_path = arg[1] or "/tmp/stream.arrow";
2222

2323
local input = Arrow.MemoryMappedInputStream.new(input_path)
24-
local reader = Arrow.StreamReader.new(input)
24+
local reader = Arrow.RecordBatchStreamReader.new(input)
2525

2626
local i = 0
2727
while true do

c_glib/example/lua/stream-to-torch-tensor.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ end
7777
local input_path = arg[1] or "/tmp/stream.arrow";
7878

7979
local input = Arrow.MemoryMappedInputStream.new(input_path)
80-
local reader = Arrow.StreamReader.open(input)
80+
local reader = Arrow.RecordBatchStreamReader.new(input)
8181

8282
local i = 0
8383
while true do

c_glib/example/lua/write-batch.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ local fields = {
3535
local schema = Arrow.Schema.new(fields)
3636

3737
local output = Arrow.FileOutputStream.new(output_path, false)
38-
local writer = Arrow.FileWriter.new(output, schema)
38+
local writer = Arrow.RecordBatchFileWriter.new(output, schema)
3939

4040
function build_array(builder, values)
4141
for _, value in pairs(values) do

0 commit comments

Comments
 (0)