You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@graphar.apache.org by "shivendra-dev54 (via GitHub)" <gi...@apache.org> on 2025/12/17 11:48:21 UTC
[PR] feat(java): Add DATE and TIMESTAMP support to DataType enum [incubator-graphar]
shivendra-dev54 opened a new pull request, #812:
URL: https://github.com/apache/incubator-graphar/pull/812
Fixes #771
<!--
Thanks for contributing to GraphAr.
If this is your first pull request you can find detailed information on [CONTRIBUTING.md](https://github.com/apache/graphar/blob/main/CONTRIBUTING.md)
The Apache GraphAr (incubating) community has restrictions on the naming of pr title. You can find instructions in
[CONTRIBUTING.md](https://github.com/apache/graphar/blob/main/CONTRIBUTING.md#title) too.
-->
### Reason for this PR
This change adds support for date and timestamp data types in the DataType enum.
This is required to support schema definitions that already reference these logical types and is discussed in issue #771.
<!--
Why are you proposing this change? If this is already tracked in an issue, please link to the issue here.
Explaining clearly why this change is beneficial is important for the reviewers to understand the context.
-->
### What changes are included in this PR?
Added `DATE` and `TIMESTAMP` entries to the `DataType` enum
Updated string parsing logic to recognize date and timestamp
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
### Are these changes tested?
No new tests are added in this PR.
This PR is intentionally scoped to the enum change only.
Test coverage for loading and saving date and timestamp types will be added in a follow-up change, as mentioned in the issue.
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
### Are there any user-facing changes?
This enables users to define date and timestamp types in schema YAML files, but does not change existing behavior.
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please uncomment the line below and explain which changes are breaking.
-->
<!-- **BREAKING CHANGE: <description>** -->
<!--
Please uncomment the line below (and provide explanation) if the changes fix either
(a) a security vulnerability,
(b) a bug that caused incorrect or invalid data to be produced, or
(c) a bug that causes a crash (even when the API contract is upheld).
We use this to highlight fixes to issues that may affect users without their knowledge. For this reason, fixing bugs that cause errors don't count, since those are usually obvious.
-->
<!-- **Critical Fix: <description>** -->
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] feat(java): Add DATE and TIMESTAMP support to DataType enum [incubator-graphar]
Posted by "shivendra-dev54 (via GitHub)" <gi...@apache.org>.
shivendra-dev54 commented on PR #812:
URL: https://github.com/apache/incubator-graphar/pull/812#issuecomment-3694604740
Thanks for pointing out the test data.
I cloned incubator-graphar-testing, set GAR_TEST_DATA accordingly, and ran the info module tests locally.
All tests passed successfully.
@yangxk1
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] feat(java): Add DATE and TIMESTAMP support to DataType enum [incubator-graphar]
Posted by "yangxk1 (via GitHub)" <gi...@apache.org>.
yangxk1 commented on PR #812:
URL: https://github.com/apache/incubator-graphar/pull/812#issuecomment-3667992967
please add more unit test, testing dataset: https://github.com/apache/incubator-graphar-testing/blob/8286724cd898047de833f0304dbddd2831afdf9f/ldbc_sample/parquet/person_knows-timestamp_person.edge.yml
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] feat(java): Add DATE and TIMESTAMP support to DataType enum [incubator-graphar]
Posted by "yangxk1 (via GitHub)" <gi...@apache.org>.
yangxk1 merged PR #812:
URL: https://github.com/apache/incubator-graphar/pull/812
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] feat(java): Add DATE and TIMESTAMP support to DataType enum [incubator-graphar]
Posted by "yangxk1 (via GitHub)" <gi...@apache.org>.
yangxk1 commented on PR #812:
URL: https://github.com/apache/incubator-graphar/pull/812#issuecomment-3680062411
I think what we need to do is add unit tests with reference to the test data instead of modifying the test data. ref:https://github.com/apache/incubator-graphar/pull/754, Just pay attention to the `info` part of this PR
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] feat(java): Add DATE and TIMESTAMP support to DataType enum [incubator-graphar]
Posted by "shivendra-dev54 (via GitHub)" <gi...@apache.org>.
shivendra-dev54 commented on PR #812:
URL: https://github.com/apache/incubator-graphar/pull/812#issuecomment-3677560715
Thanks for pointing this out. I’ve opened a corresponding PR here:
https://github.com/apache/incubator-graphar-testing/pull/32
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] feat(java): Add DATE and TIMESTAMP support to DataType enum [incubator-graphar]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #812:
URL: https://github.com/apache/incubator-graphar/pull/812#issuecomment-3667992506
## [Codecov](https://app.codecov.io/gh/apache/incubator-graphar/pull/812?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `60.00000%` with `2 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 77.09%. Comparing base ([`cf728bf`](https://app.codecov.io/gh/apache/incubator-graphar/commit/cf728bfb3f1700094c6941532c4d74637ac9ba5a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`200a18e`](https://app.codecov.io/gh/apache/incubator-graphar/commit/200a18e3e469f82597d30ebbce3a5e09af0dd4db?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/incubator-graphar/pull/812?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...in/java/org/apache/graphar/info/type/DataType.java](https://app.codecov.io/gh/apache/incubator-graphar/pull/812?src=pr&el=tree&filepath=maven-projects%2Finfo%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgraphar%2Finfo%2Ftype%2FDataType.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bWF2ZW4tcHJvamVjdHMvaW5mby9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3JhcGhhci9pbmZvL3R5cGUvRGF0YVR5cGUuamF2YQ==) | 60.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/incubator-graphar/pull/812?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #812 +/- ##
============================================
- Coverage 77.10% 77.09% -0.02%
Complexity 607 607
============================================
Files 84 84
Lines 8912 8916 +4
Branches 1045 1045
============================================
+ Hits 6872 6874 +2
- Misses 1800 1802 +2
Partials 240 240
```
| [Flag](https://app.codecov.io/gh/apache/incubator-graphar/pull/812/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [java-info](https://app.codecov.io/gh/apache/incubator-graphar/pull/812/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `84.71% <60.00%> (-0.12%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/incubator-graphar/pull/812?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] feat(java): Add DATE and TIMESTAMP support to DataType enum [incubator-graphar]
Posted by "shivendra-dev54 (via GitHub)" <gi...@apache.org>.
shivendra-dev54 commented on PR #812:
URL: https://github.com/apache/incubator-graphar/pull/812#issuecomment-3682048412
I have added new tests for the new data types
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] feat(java): Add DATE and TIMESTAMP support to DataType enum [incubator-graphar]
Posted by "yangxk1 (via GitHub)" <gi...@apache.org>.
yangxk1 commented on PR #812:
URL: https://github.com/apache/incubator-graphar/pull/812#issuecomment-3691340043
In order to be rigorous enough, I think we also need to verify whether yaml text can be parsed through [testdata](https://github.com/apache/incubator-graphar-testing/blob/8286724cd898047de833f0304dbddd2831afdf9f/ldbc_sample/parquet/person_knows-timestamp_person.edge.yml).
--
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: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org