You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pgwhalen (via GitHub)" <gi...@apache.org> on 2024/03/29 16:19:20 UTC

[PR] GH- 40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

pgwhalen opened a new pull request, #40894:
URL: https://github.com/apache/arrow/pull/40894

   ### Rationale for this change
   
   Fixes https://github.com/apache/arrow/issues/40893.
   
   ### What changes are included in this PR?
   
    - Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver
    - Return PeriodDuration as JDBC Object type, because there is no good java.time type for this interval
    - Use the toString() of PeriodDuration as the StringGetter, because it isn't clear what a better stringification of the type would be.  IntervalStringUtils converts other intervals to Oracle's string representation of interval types, but there doesn't appear to be an analog for this type.
   
   ### Are these changes tested?
   
   Unit tests have been added that match those for other interval types.  I'm unaware of any other types of tests worth adding to, but I'd be happy to if pointed there.
   
   ### Are there any user-facing changes?
   
   The only change users should noticed is that the FlightSQL JDBC Driver can now handle more query responses.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2027444120

   :warning: GitHub issue #40893 **has been automatically assigned in GitHub** to PR creator.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "pgwhalen (via GitHub)" <gi...@apache.org>.
pgwhalen commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2027447029

   If there is an idea for a better "stringification" of this type, I'm happy to implement it.  The postgres interval type comes to mind, though that would be inconsistent with the existing Oracle type stringifications.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "pgwhalen (via GitHub)" <gi...@apache.org>.
pgwhalen commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2028256982

   So what I'm going for:
    - `PeriodDuration` is still the object returned by `getObject()` to JDBC clients (matching the return type on the underlying vector)
    - `PeriodDuration` should implement `TemporalAmount`
    - The string returned by its `StringGetter` should be an ISO-8601 interval
   
   Does that sound right @laurentgo @lidavidm ?
   
   It's perhaps worth pointing out that I'll basically be re-implementing [ThreeTen's PeriodDuration class](https://github.com/ThreeTen/threeten-extra/blob/main/src/main/java/org/threeten/extra/PeriodDuration.java).  I assume it's not desirable to replace Arrow's `PeriodDuration` with that class entirely.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "pgwhalen (via GitHub)" <gi...@apache.org>.
pgwhalen commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2027625442

   > Isn't [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)/[RFC3339](https://www.rfc-editor.org/rfc/rfc3339.html) a good and relatively well-known format?
   
   I think that should work.  The `toString()` of `Period` and `Duration` produce ISO-8601 compatible strings already.  I thought they had overlapping units but upon second glance it doesn't appear they do, so I can more or less concatenate them and get a string. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2028786607

   That sounds good to me, thank you.
   
   We probably don't want to take a dependency on that, no. I suppose we have to just live with the shaded name, too (probably for the best if there's no stdlib type that fits).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH- 40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2027443178

   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for opening a pull request!
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/arrow/pulls/)
     * [Contribution Guidelines - Contributing Overview](https://arrow.apache.org/docs/developers/overview.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "laurentgo (via GitHub)" <gi...@apache.org>.
laurentgo commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2027917208

   > I suppose Joda Time's period was not fully adopted into Java, as its Period does have time units... https://www.joda.org/joda-time/apidocs/org/joda/time/Period.html
   
   I guess the driver could implement `java.time.TemporalAmount` which would be as standard as possible?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "laurentgo (via GitHub)" <gi...@apache.org>.
laurentgo commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2027502709

   > If there is an idea for a better "stringification" of this type, I'm happy to implement it. The postgres interval type comes to mind, though that would be inconsistent with the existing Oracle type stringifications.
   Isn't [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)/[RFC3339](https://www.rfc-editor.org/rfc/rfc3339.html) a good and relatively well-known format?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2027882359

   I was going to ask what other drivers do, but it appears Postgres also has a custom type ([PGInterval](https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/util/PGInterval.html)). So this is _probably_ reasonable, except I wonder, since we shade the JAR for distribution, this will force people to refer to a shaded class?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2027882663

   I suppose Joda Time's period was not fully adopted into Java, as its Period does have time units... https://www.joda.org/joda-time/apidocs/org/joda/time/Period.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2030527918

   After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 17a536839ee20f80e80f93ec6ea714a301d12fdf.
   
   There was 1 benchmark result indicating a performance regression:
   
   - Commit Run on `arm64-m6g-linux-compute` at [2024-03-31 18:26:09Z](https://conbench.ursa.dev/compare/runs/79a3d97b42a44d738ed16b73e8e817da...e9bf63e3d68a44209107269dc7dfa4fa/)
     - [`dataset-read` (Python) with async=True, dataset=nyctaxi_multi_parquet_s3, pre_buffer=true](https://conbench.ursa.dev/compare/benchmarks/0660784044287f0c8000383f62b7f4b9...06609974d78179c7800098e057bbc4f3)
   
   The [full Conbench report](https://github.com/apache/arrow/runs/23317396791) has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #40894:
URL: https://github.com/apache/arrow/pull/40894#issuecomment-2028793039

   Hmm, it appears ISO8601 durations as proposed for ECMAScript do not allow negative components. But Java does this (as we see here), other systems like Pandas do as well, and at some point the spec was revised to allow it (even though this doesn't seem to have been made easily accessible...): https://www.postgresql.org/message-id/9q0ftb37dv7.fsf%40gmx.us
   
   so I'm ok with it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40893: [Java][FlightRPC] Support IntervalMonthDayNanoVector in FlightSQL JDBC Driver [arrow]

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm merged PR #40894:
URL: https://github.com/apache/arrow/pull/40894


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org