| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| /** | ||
| * Creates a {@code QueryParameterValue} object with a type of INTERVAL. This method is obsolete. | ||
| * Use {@link #interval(String)} instead. | ||
| */ | ||
| @ObsoleteApi("Use interval(String) instead") | ||
| public static QueryParameterValue interval(PeriodDuration value) { |
There was a problem hiding this comment.
@lqiu96 I'm not sure if this makes sense. PeriodDuration is part of Threeten Extra which only accepts java.time objects. The class purpose is to blend a Period (years to days) with a Duration (hours to nanos).
I'm guessing we may want to keep it since it's just a helper class that happens to be from ThreeTen but not meant to be a backport (since this is not available in the JDK).
Sorry, something went wrong.
There was a problem hiding this comment.
Hmm. Ideally, I think we should try to migrate away from threeten-extra as well. I'm guessing from your comment that PeriodDuration doesn't exist in the JDK so we can't build a 1:1 method signature replacement with the available JDK alternative.
If interval(String) has the same behavior, then I think that probably can use that as the alternative. But would be a question for the Bigquery SMEs to confirm that they have the same behavior.
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you. @PhongChuong can you please confirm whether marking this threeten-extra-based method as @ObsoleteApi makes sense? And does interval(String) as the suggested alternative make sense?
Sorry, something went wrong.
There was a problem hiding this comment.
@diegomarquezp , marking it as @ObsoleteApi and the suggested alternative makes sense.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR introduces java.time alternatives to existing org.threeten.bp.* methods, as well as switching internal variables (if any) to java.time
The main constraint is to keep the changes backwards compatible, so for each existing threeten method "method1(org.threeten.bp.Duration)" we will add an alternative with a Duration (or Timestamp when applicable) suffix: "method1Duration(java.time.Duration)".
For most cases, the implementation will be held in the java.time method and the old threeten method will just delegate the call to it. However, for the case of abstract classes, the implementation will be kept in the threeten method to avoid breaking changes (i.e. users that already overloaded the method in their user code).