Skip to content

fix(bigquery): fix invalid mappings in domain models - #14646

Merged
lqiu96 merged 1 commit into
mainfrom
fix/bq-b5-domain-model-bugs
Oct 13, 2026
Merged

lqiu96 merged 1 commit into
mainfrom
fix/bq-b5-domain-model-bugs

Conversation

@lqiu96

@lqiu96 lqiu96 commented Oct 13, 2026

Copy link
Copy Markdown
Member

No description provided.

Comment on lines -432 to -433
} else if (String.class.isAssignableFrom(type)) {
return StandardSQLTypeName.GEOGRAPHY;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the above else blocks makes this unreachable

}

/**
* Default instances created automatically by the static {@link #of(Object, Class)} method.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

following the impl from other languages, this automatic conversion only works for native types. other types must be called via the type specific #of method

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request addresses several bugs and refactors code across the BigQuery library. Key changes include correcting self-assignment issues in IndexUnusedReason, fixing a typo in ExternalTableDefinition where the time format was used instead of the timestamp format, correcting a null check in JobStatistics, and refactoring type mappings in QueryParameterValue. Feedback on the changes in QueryParameterValue points out that using break statements in the JSON and INTERVAL cases of valueToStringOrNull allows unsupported types to fall through and be silently converted to strings, and suggests throwing an IllegalArgumentException instead.

@lqiu96
lqiu96 requested a review from jinseopkim0 October 13, 2026 16:08
@lqiu96
lqiu96 marked this pull request as ready for review October 13, 2026 16:08
@lqiu96
lqiu96 requested review from a team as code owners October 13, 2026 16:08
@jinseopkim0

Copy link
Copy Markdown
Contributor

Can we add unit tests for these changes?

@lqiu96
lqiu96 force-pushed the fix/bq-b5-domain-model-bugs branch from fc42699 to aab8131 Compare October 13, 2026 17:16
@lqiu96
lqiu96 enabled auto-merge (squash) October 13, 2026 17:27
@lqiu96
lqiu96 merged commit 17048ed into main Oct 13, 2026
207 of 208 checks passed
@lqiu96
lqiu96 deleted the fix/bq-b5-domain-model-bugs branch October 13, 2026 18:04
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.

2 participants