Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sio/arrowio/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ func isRecursive(typ super.Type, seen map[string]struct{}) bool {
return true
}
seen[typ.Name] = struct{}{}
defer delete(seen, typ.Name)
return isRecursive(typ.Type, seen)
case *super.TypeRecord:
for _, f := range typ.Fields {
Expand Down
16 changes: 16 additions & 0 deletions sio/arrowio/ztests/roundtrip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,19 @@ inputs:
outputs:
- name: stdout
data: *stdin

---

script: |
super -f arrows - | super -i arrows -s -

inputs:
- name: stdin
data: |
type named = int64
{a:1::named,b:2::named}

outputs:
- name: stdout
data: |
{a:1,b:2}
4 changes: 4 additions & 0 deletions sio/arrowio/ztests/writer-errors.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
script: |

! echo '{a:1} {b:2}' | super -f arrows -
! echo 1 | super -f arrows -
! echo {} | super -f arrows -
! echo 'type T={a:T|int64} {a:1}::T' | super -f arrows -


outputs:
- name: stderr
data: |
arrowio: encountered multiple types (consider 'fuse'): {a:int64} and {b:int64}
arrowio: not a record: 1
arrowio: unsupported type: empty record
arrowio: unsupported type: T
18 changes: 18 additions & 0 deletions sio/parquetio/ztests/types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,21 @@ outputs:
2: null
}
}


---

script: |
super -f parquet -o f.parquet -
super -s f.parquet

inputs:
- name: stdin
data: |
type named = int64
{a:1::named,b:2::named}

outputs:
- name: stdout
data: |
{a:1,b:2}
3 changes: 3 additions & 0 deletions sio/parquetio/ztests/writer-errors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ script: |
! echo '{a:1} {b:2}' | super -f parquet -
! echo 1 | super -f parquet -
! echo {} | super -f parquet -
! echo 'type T={a:T|int64} {a:1}::T' | super -f parquet -
! echo {a:1s} | super -f parquet -


outputs:
- name: stderr
data: |
parquetio: encountered multiple types (consider 'fuse'): {a:int64} and {b:int64}
parquetio: not a record: 1
parquetio: unsupported type: empty record
parquetio: unsupported type: T
parquetio: unsupported type: not implemented: support for DURATION
Loading