Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Kafka CSV, JSON and RAW encoders to use mappings
See #5791.
- Loading branch information
Showing
10 changed files
with
632 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...es/docker/presto-product-tests/conf/presto/etc/catalog/kafka/write_all_datatypes_csv.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"tableName": "write_all_datatypes_csv", | ||
"schemaName": "product_tests", | ||
"topicName": "write_all_datatypes_csv", | ||
"message": { | ||
"dataFormat": "csv", | ||
"fields": [ | ||
{ | ||
"name": "c_varchar", | ||
"type": "VARCHAR", | ||
"mapping": "0" | ||
}, | ||
{ | ||
"name": "c_bigint", | ||
"type": "BIGINT", | ||
"mapping": "1" | ||
}, | ||
{ | ||
"name": "c_integer", | ||
"type": "INTEGER", | ||
"mapping": "2" | ||
}, | ||
{ | ||
"name": "c_smallint", | ||
"type": "SMALLINT", | ||
"mapping": "3" | ||
}, | ||
{ | ||
"name": "c_tinyint", | ||
"type": "TINYINT", | ||
"mapping": "4" | ||
}, | ||
{ | ||
"name": "c_double", | ||
"type": "DOUBLE", | ||
"mapping": "5" | ||
}, | ||
{ | ||
"name": "c_boolean", | ||
"type": "BOOLEAN", | ||
"mapping": "6" | ||
} | ||
] | ||
}, | ||
"key": { | ||
"dataFormat": "raw", | ||
"fields": [] | ||
} | ||
} |
157 changes: 157 additions & 0 deletions
157
...s/docker/presto-product-tests/conf/presto/etc/catalog/kafka/write_all_datatypes_json.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
{ | ||
"tableName": "write_all_datatypes_json", | ||
"schemaName": "product_tests", | ||
"topicName": "write_all_datatypes_json", | ||
"message": { | ||
"dataFormat": "json", | ||
"fields": [ | ||
{ | ||
"name": "c_varchar", | ||
"type": "VARCHAR", | ||
"mapping": "j_varchar" | ||
}, | ||
{ | ||
"name": "c_bigint", | ||
"type": "BIGINT", | ||
"mapping": "j_bigint" | ||
}, | ||
{ | ||
"name": "c_integer", | ||
"type": "INTEGER", | ||
"mapping": "j_integer" | ||
}, | ||
{ | ||
"name": "c_smallint", | ||
"type": "SMALLINT", | ||
"mapping": "j_smallint" | ||
}, | ||
{ | ||
"name": "c_tinyint", | ||
"type": "TINYINT", | ||
"mapping": "j_tinyint" | ||
}, | ||
{ | ||
"name": "c_double", | ||
"type": "DOUBLE", | ||
"mapping": "j_double" | ||
}, | ||
{ | ||
"name": "c_boolean", | ||
"type": "BOOLEAN", | ||
"mapping": "j_boolean" | ||
}, | ||
{ | ||
"name": "c_timestamp_milliseconds_since_epoch", | ||
"type": "TIMESTAMP", | ||
"mapping": "j_timestamp_milliseconds_since_epoch", | ||
"dataFormat": "milliseconds-since-epoch" | ||
}, | ||
{ | ||
"name": "c_timestamp_seconds_since_epoch", | ||
"type": "TIMESTAMP", | ||
"mapping": "j_timestamp_seconds_since_epoch", | ||
"dataFormat": "seconds-since-epoch" | ||
}, | ||
{ | ||
"name": "c_timestamp_iso8601", | ||
"type": "TIMESTAMP", | ||
"mapping": "j_timestamp_iso8601", | ||
"dataFormat": "iso8601" | ||
}, | ||
{ | ||
"name": "c_timestamp_rfc2822", | ||
"type": "TIMESTAMP", | ||
"mapping": "j_timestamp_rfc2822", | ||
"dataFormat": "rfc2822" | ||
}, | ||
{ | ||
"name": "c_timestamp_custom", | ||
"type": "TIMESTAMP", | ||
"mapping": "j_timestamp_custom", | ||
"dataFormat": "custom-date-time", | ||
"formatHint": "MM/yyyy/dd H:m:s" | ||
}, | ||
{ | ||
"name": "c_date_iso8601", | ||
"type": "DATE", | ||
"mapping": "j_date_iso8601", | ||
"dataFormat": "iso8601" | ||
}, | ||
{ | ||
"name": "c_date_custom", | ||
"type": "DATE", | ||
"mapping": "j_date_custom", | ||
"dataFormat": "custom-date-time", | ||
"formatHint": "yyyy/dd/MM" | ||
}, | ||
{ | ||
"name": "c_time_milliseconds_since_epoch", | ||
"type": "TIME", | ||
"mapping": "j_time_milliseconds_since_epoch", | ||
"dataFormat": "milliseconds-since-epoch" | ||
}, | ||
{ | ||
"name": "c_time_seconds_since_epoch", | ||
"type": "TIME", | ||
"mapping": "j_time_seconds_since_epoch", | ||
"dataFormat": "seconds-since-epoch" | ||
}, | ||
{ | ||
"name": "c_time_iso8601", | ||
"type": "TIME", | ||
"mapping": "j_time_iso8601", | ||
"dataFormat": "iso8601" | ||
}, | ||
{ | ||
"name": "c_time_custom", | ||
"type": "TIME", | ||
"mapping": "j_time_custom", | ||
"dataFormat": "custom-date-time", | ||
"formatHint": "mm:HH:ss" | ||
}, | ||
{ | ||
"name": "c_timestamptz_iso8601", | ||
"type": "TIMESTAMP WITH TIME ZONE", | ||
"mapping": "j_timestamptz_iso8601", | ||
"dataFormat": "iso8601" | ||
}, | ||
{ | ||
"name": "c_timestamptz_rfc2822", | ||
"type": "TIMESTAMP WITH TIME ZONE", | ||
"mapping": "j_timestamptz_rfc2822", | ||
"dataFormat": "rfc2822" | ||
}, | ||
{ | ||
"name": "c_timestamptz_custom", | ||
"type": "TIMESTAMP WITH TIME ZONE", | ||
"mapping": "j_timestamptz_custom", | ||
"dataFormat": "custom-date-time", | ||
"formatHint": "MM/yyyy/dd H:m:s ZZZ" | ||
}, | ||
{ | ||
"name": "c_timestamptz_custom_with_zone", | ||
"type": "TIMESTAMP WITH TIME ZONE", | ||
"mapping": "j_timestamptz_custom_with_zone", | ||
"dataFormat": "custom-date-time", | ||
"formatHint": "MM/yyyy/dd H:m:s ZZZ" | ||
}, | ||
{ | ||
"name": "c_timetz_iso8601", | ||
"type": "TIME WITH TIME ZONE", | ||
"mapping": "j_timetz_iso8601", | ||
"dataFormat": "iso8601" | ||
}, | ||
{ | ||
"name": "c_timetz_custom", | ||
"type": "TIME WITH TIME ZONE", | ||
"mapping": "j_timetz_custom", | ||
"dataFormat": "custom-date-time", | ||
"formatHint": "mm:HH:ss ZZ" | ||
} | ||
] | ||
}, | ||
"key": { | ||
"dataFormat": "raw", | ||
"fields": [] | ||
} | ||
} |
Oops, something went wrong.