-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 source-postgres: fix jsonb[] handling bug #30534
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -847,6 +847,17 @@ private void addArraysTestData() { | |
.addExpectedValues("[131070.237689,231072.476596593]") | ||
.build()); | ||
|
||
addDataTypeTestData( | ||
TestDataHolder.builder() | ||
.sourceType("jsonb_array") | ||
.fullSourceDataType("JSONB[]") | ||
.airbyteType(JsonSchemaType.builder(JsonSchemaPrimitive.ARRAY) | ||
.withItems(JsonSchemaType.builder(JsonSchemaPrimitive.STRING).build()) | ||
.build()) | ||
.addInsertValues("ARRAY['{\"foo\":\"bar\"}'::JSONB, NULL]") | ||
.addExpectedValues("[\"{\\\"foo\\\": \\\"bar\\\"}\",null]") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still seem likes Postgres's string representation of the array. I think we want something along the lines of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed offline, disregard this. It's Java's representation of the array. We've tested this version manually and it fixes the regression 👍 |
||
.build()); | ||
|
||
addDataTypeTestData( | ||
TestDataHolder.builder() | ||
.sourceType("money_array") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come jsonb[] type not falling into
case ARRAY
?