Skip to content

Conversation

@relud
Copy link
Contributor

@relud relud commented Jul 6, 2020

fixes #1317

@relud relud requested a review from jklukas July 6, 2020 19:41

// A record of key and value indicates we need to transformForBqSchema a map to an array.
} else if (isMapType(field)) {
expandMapType(jsonFieldName, (ObjectNode) value, field, parent, additionalProperties);
Copy link
Contributor Author

@relud relud Jul 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the exception in #1317 is thrown by this line trying to cast a literal null to ObjectNode here.

This PR fixes that by allowing null for any value passed to processField, which I believe is called on every type that is not an element of a list.

The resulting behavior omits the field, which BigQuery will interpret as an empty list if necessary.

@relud relud merged commit 593f0db into master Jul 6, 2020
@relud relud deleted the allow-null-map branch July 6, 2020 20:14
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.

ingestion-sink undeliverable message: java.lang.ClassCastException: null

3 participants