Skip to content

Fix BigQuery unsupported type with Method.DEFAULT of Joda LocalDateTime#5922

Open
subhramit wants to merge 6 commits intospotify:mainfrom
subhramit:fix-bq-joda-ldt
Open

Fix BigQuery unsupported type with Method.DEFAULT of Joda LocalDateTime#5922
subhramit wants to merge 6 commits intospotify:mainfrom
subhramit:fix-bq-joda-ldt

Conversation

@subhramit
Copy link
Copy Markdown

Closes #5596

Post-process the Avro schema fields by correlating them with the original TableSchema fields and stamping the correct logicalType properties.

Note that a JSON round-trip was needed in addLogicalType as Avro's Schema object locks properties after parsing. Directly calling addProp on the original schema returned by BigQueryUtils throws AvroRuntimeException: Can't redefine. Parsing from JSON gives a fresh mutable copy.

Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
@subhramit subhramit changed the title Fix BigQuery unsupported type with Method.DEFAULT of Joda LocalDateTime Fix BigQuery unsupported type with Method.DEFAULT of Joda LocalDateTime Apr 8, 2026
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigQuery: fails with Joda LocalDateTime when using default method

1 participant