GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat: introduce `java.time` methods and variables by diegomarquezp · Pull Request #2780 · googleapis/java-bigquerystorage
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
Conversation
Contributor
This PR introduces The main constraint is to keep the changes backwards compatible, so for each existing threeten method " For most cases, the implementation will be held in the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
@lqiu96 This check (java 8 only) is failing with The problem is with Lines 95 to 102 in 5f1b30a
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .appendLiteral(' ') | ||
| .optionalEnd() | ||
| .optionalStart() | ||
| .appendOffset("+HH:MM", "+00:00") | ||
| .appendZoneOrOffsetId() | ||
| .optionalEnd() | ||
| .optionalStart() | ||
| .appendZoneText(TextStyle.SHORT) | ||
| .optionalEnd() | ||
| .optionalStart() | ||
| .appendLiteral('Z') | ||
| .optionalEnd() | ||
| .toFormatter() | ||
| .withZone(ZoneOffset.UTC); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This fix works for the current tests. Note that the literal Z is dropped from the config because appendZoneOrOffsetId() uses Z as the no-zone string
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Added a test for +00:00 in 260c835
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| package com.google.cloud.bigquery.storage.util; | ||
|
|
||
| public class TimeConversionUtils { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why is this added in BQStorage and not used from sdk-platform-java?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
They are functions only used in BQS so far (confirmed other repos don't need them). However, the reason is simply because it's faster to implement here than waiting for a new release of gax with the utilities we have here. What if we follow up in gax and temporarily have these functions in this repo?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What if we follow up in gax and temporarily have these functions in this repo?
Sure. Can we make this class package-private until we migrate this to Gax? Can you also create an issue in sdk-platform-java for this?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
As discussed internally, left as @InternalApi, referencing the new issue in sdk-platform: https://github.com/googleapis/sdk-platform-java/issues/3412
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| <to>java.time.Duration</to> | ||
| </difference> | ||
| <difference> | ||
| <!--The retryDelay field is used by ApiResultRetryAlgorithm, which is marked as @InternalApi--> |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Errors$IsRetryableStatusResult is still marked as public even if it's only used by ApiResultRetryAlgorithm in the BQStorage SDK. I think it's still accessible which is problematic.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@PhongChuong what's the rationale of Errors$IsRetryableStatusResult being public? Is it similar to the case of ApiResultRetryAlgorithm "visible for technical reasons"?
Also, does it make sense to change their datatypes directly, without threeten alternatives as done currently?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't know the historical reason as to why it is public but from the code, I would assume that is it "visible for technical reasons". Specifically, while IsRetryableStatusResult is public, it seems to be only used in ApiResultRetryAlgorithm and it is not part of the return value. I think it would be okay to change the datatype directly here.
@yirutang , what do you think?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I am fine making it private. I don't think external user should use it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Overall the changes looks good. Thank you for the PR, it looks like a lot of work tracking down all the changes needed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| <to>java.time.Duration</to> | ||
| </difference> | ||
| <difference> | ||
| <!--The retryDelay field is used by ApiResultRetryAlgorithm, which is marked as @InternalApi--> |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't know the historical reason as to why it is public but from the code, I would assume that is it "visible for technical reasons". Specifically, while IsRetryableStatusResult is public, it seems to be only used in ApiResultRetryAlgorithm and it is not part of the return value. I think it would be okay to change the datatype directly here.
@yirutang , what do you think?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Added a small comment if you could address
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.