Skip to content
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

[Java BQ] Default null array in Beam Row to empty array #32604

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

ahmedabu98
Copy link
Contributor

We should relax our type checking and default null array values to empty arrays. This is already done for TableRows [1] and is also the behavior of GoogleSQL [2]

[1]

if (bqValue == null) {
if (fieldDescriptor.isOptional() || allowMissingRequiredFields) {
return null;
} else if (fieldDescriptor.isRepeated()) {
return Collections.emptyList();

[2] https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#array_type

@ahmedabu98 ahmedabu98 merged commit 301286f into apache:master Oct 1, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants