Mryange opened a new pull request, #69018:
URL: https://github.com/apache/doris/pull/69018

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Problem Summary: Add `h3_lat_lng_to_cell`, `h3_cell_to_lat_lng`, and 
`h3_cell_to_boundary` using official H3 4.5.0. Coordinates use degrees in 
latitude/longitude order. Invalid inputs return NULL; centers contain two 
coordinates and boundaries preserve H3 vertex order without closing the ring. 
Input NULL propagation uses the default execution framework. FE has no separate 
Java H3 evaluator; constant folding through BE remains supported.
   
   Build H3 as a static C library from its 18 upstream core sources. Generate 
its versioned API header in the build directory, export include paths through 
the target, enable PIC, and inherit Doris sanitizer flags. Only the H3 target 
relaxes third-party warning errors. The wrapper avoids upstream standalone 
tools and global build options. Include the upstream license attribution and 
NOTICE.
   
   ### Release note
   
   Add three H3 SQL functions for mapping coordinates to cells and retrieving 
cell centers and boundaries.
   
   ### Check List (For Author)
   
   - Test
       - [x] Regression test
       - [x] Unit Test
       - [x] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Add three SQL functions.
   - Does this need documentation?
       - [ ] No.
       - [x] Yes. SQL function documentation is needed; no documentation PR yet.
   
   Validation on Linux x86_64:
   - ASAN BE build and clean FE build passed; H3 objects carry ASAN/UBSAN flags.
   - `run-be-ut.sh --run --filter=FunctionH3Test.* -j48`: all three tests 
passed.
   - `run-regression-test.sh --run -d query_p0/sql_functions/spatial_functions 
-s test_h3`: generated results with `-forceGenOut`, inspected them, and reran 
successfully. Includes constant-folding modes, nullable/non-nullable table 
columns, all 16 resolutions, stored nested arrays, array expansion, 
filtering/grouping, and 35,000 mixed rows.
   - Compared 10,000 inputs per function against official C/Python H3 4.5.0: 
exact agreement. ClickHouse 26.3.9.8 (H3 3.7.1) matched cell IDs and 
coordinates within tolerance (maximum coordinate error 8.29e-8 degrees).
   - Clang-format 16 and targeted clang-tidy checks passed; no sanitizer 
diagnostics during these tests. ARM/macOS builds were not run.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to