Uh oh!
There was an error while loading. Please reload this page.
ORC-1920: [C++] Support Geometry and Geography types - #2269
Conversation
Geometry and Geography types
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Thank you, @ffacs .
cc @wgtmac and @williamhyun
Uh oh!
There was an error while loading. Please reload this page.
| /// | ||
| /// These values correspond to the 1, 2, ..., 7 component of the WKB integer | ||
| /// geometry type (i.e., the value of geometry_type % 1000). | ||
| enum class GeometryType { |
There was a problem hiding this comment.
In Java, we had an additional value, -1, for UNKNOWN_TYPE_ID.
There was a problem hiding this comment.
C++ employs a different implementation that invalidates statistics when unknown types are encountered; therefore, UNKNOWN_TYPE_ID is unnecessary in this context.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| std::stringstream ss; | ||
| ss << "<GeoStatistics>"; |
There was a problem hiding this comment.
ditto. Why do we have this only in C++ implementation? If this is required, can we have this in Java first?
There was a problem hiding this comment.
I think it is due to gap between Parquet Java and C++ implementations...
There was a problem hiding this comment.
Yes, it is due to gap between Parquet Java and C++ implementations..
dongjoon-hyun
left a comment
There was a problem hiding this comment.
I have a few minor comments about the feature parity between Java and C++ implementations.
williamhyun
left a comment
There was a problem hiding this comment.
+1, thank you @ffacs for this PR, waiting on the above comment before merging.
dongjoon-hyun
commented
Jun 23, 2025
Gentle ping, @ffacs . |
ffacs
commented
Jun 24, 2025
Pong. Thank you for your review @dongjoon-hyun , I'd update this patch these days. |
dongjoon-hyun
commented
Jun 24, 2025
Thank you, @ffacs . Also, please participate the 1.8.10 vote too when you have some time. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| std::stringstream ss; | ||
| ss << "<GeoStatistics>"; |
There was a problem hiding this comment.
I think it is due to gap between Parquet Java and C++ implementations...
dongjoon-hyun
commented
Jun 30, 2025
Could you fix the above comments, @ffacs ? |
wgtmac
commented
Jul 3, 2025
Let me know when ready to review. |
ffacs
commented
Jul 3, 2025
@wgtmac@dongjoon-hyun I'm ready to review now, please take a look when you're free~ |
dongjoon-hyun
commented
Jul 4, 2025
Thank you, @ffacs . |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| * This file contains code adapted from the Apache Arrow project. | ||
| * | ||
| * Original source: | ||
| * https://github.com/apache/arrow/blob/main/cpp/src/parquet/geospatial/statistics.h |
There was a problem hiding this comment.
Please provide a tag based location instead of the main branch because it changes always.
There was a problem hiding this comment.
There are no tags that contain this patch yet.
| * This file contains code adapted from the Apache Arrow project. | ||
| * | ||
| * Original source: | ||
| * https://github.com/apache/arrow/blob/main/cpp/src/parquet/geospatial/statistics.cc |
There was a problem hiding this comment.
Please provide a tag based location instead of the main branch because it changes always.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| virtual const std::string& getCRS() const = 0; | ||
| virtual geospatial::EIAlgo getEIAlgo() const = 0; |
There was a problem hiding this comment.
| virtualconst std::string& getCRS() const = 0; | |
| virtual geospatial::EIAlgo getEIAlgo() const = 0; | |
| virtualconst std::string& getCrs() const = 0; | |
| virtual geospatial::EdgeInterpolationAlgorithm getAlgorithm() const = 0; |
It would be good to add comment to say these two functions are for geometry & geography types only.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| void WKBGeometryBounder::mergeGeometryInternal(WKBBuffer* src, bool recordWkbType) { | ||
| uint8_t endian = src->ReadUInt8(); | ||
| bool swap = endian != 0x00; | ||
| if (isLittleEndian()) { |
There was a problem hiding this comment.
Perhaps we can use if constexpr (std::endian::native == std::endian::little)
There was a problem hiding this comment.
std::endian requires C++20, we are using c++17 now.
Uh oh!
There was an error while loading. Please reload this page.
dongjoon-hyun
commented
Jul 11, 2025
Uh oh!
There was an error while loading. Please reload this page.
wgtmac
commented
Jul 13, 2025
My only concern is the name of public api: https://github.com/apache/orc/pull/2269/files#r2184135226. It is better to use |
dongjoon-hyun
commented
Jul 14, 2025
Thank you everyone, @ffacs , @williamhyun , @wgtmac . |
What changes were proposed in this pull request? Support Geometry and Geography types for c++ side Why are the changes needed? Add support for Geometry and Geography types How was this patch tested? UT passed Was this patch authored or co-authored using generative AI tooling? No Closes#2269 from ffacs/geo. Authored-by: ffacs <ffacs520@gmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit ca9bb59) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
### What changes were proposed in this pull request? This PR aims to upgrade ORC to 2.2.0. 2.2.0 RC1 is currently under voting. ### Why are the changes needed? Apache ORC 2.2.0 is a new feature release. - https://github.com/apache/orc/releases/tag/v2.2.0 - apache/orc#2032 - apache/orc#2338 - apache/orc#2269 - apache/orc#2249 - apache/orc#2144 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes#51676 from williamhyun/ORC-2.2.0. Authored-by: William Hyun <william@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
What changes were proposed in this pull request?
Support Geometry and Geography types for c++ side
Why are the changes needed?
Add support for Geometry and Geography types
How was this patch tested?
UT passed
Was this patch authored or co-authored using generative AI tooling?
No