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
3 changes: 2 additions & 1 deletion value.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ func convertValue(athenaType string, rawValue *string) (any, error) {
case "varchar",
"timestamp", "timestamp with time zone",
"date",
"time", "time with time zone":
"time", "time with time zone",
"array", "map", "row":
return val, nil
default:
return []byte(val), nil
Expand Down
15 changes: 15 additions & 0 deletions value_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@ func TestConvertValue(t *testing.T) {
rawValue: toPtr("12:34:56 JST"),
want: "12:34:56 JST",
},
"array": {
athenaType: "array",
rawValue: toPtr("[one, two, three]"),
want: "[one, two, three]",
},
"map": {
athenaType: "map",
rawValue: toPtr("{one=1, two=2, three=3}"),
want: "{one=1, two=2, three=3}",
},
"row": {
athenaType: "row",
rawValue: toPtr("{one, two, three}"),
want: "{one, two, three}",
},
"unknown type": {
athenaType: "unknown",
rawValue: toPtr("unknown"),
Expand Down