-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(sf|h3): reimplement basic h3 functions #489
chore(sf|h3): reimplement basic h3 functions #489
Conversation
This pull request has been linked to Shortcut Story #391760: Reimplement basic H3 functions in AT Snowflake using native H3 functions. |
9579ad0
to
84485ae
Compare
8ccc3d6
to
3594117
Compare
I would update the Description -> Shortcut on this PR to contain the shortcut story and autolink. Also I recommend taking a look to the In this case would be more like: |
I think renaming the input parameters is not needed (that way we avoid the need to update the docs). I've tested with index, INDEX, "INDEX", and it worked fine. What problem did you face @DeanSherwin? |
Not a technical problem, Just a habit. I like to avoid using reserved SQL keywords like INDEX or SIZE as parameter names. I will change it back now. Thanks! |
Got it. Let's keep the interface for now to minimize the changes, but good point to consider in the future |
5d6ff2b
to
0f8cc80
Compare
0f8cc80
to
2c68f1b
Compare
@Jesus89 @vdelacruzb Guys - my thinking now is that H3_KDISTANCE_RING should be reverted to the original UDF as on A single call to a JS library is much faster than using the new H3_GRID_DISK and then passing that array to a UDF for processing. My attempts at a better algorithm in JS failed. And any SQL I can create to get a better performance isn't compatible with a UDF. Thoughts? Unlike H3_BOUNDARY I don't think this warrants a follow-up task as this function doesn't have a native SF implementation and is custom to CARTO's UDF library anyways. |
I agree. We could create a ticket to research in the future (same as H3_BOUNDARY) if H3_GRID_DISK gets improved or they provide a more useful function for our H3_KDISTANCE_RING. |
Agreed: https://app.shortcut.com/cartoteam/story/398983/research-an-improved-h3-kring-distance-for-at-sf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job. LGTM
Once you have removed this file: clouds/snowflake/results.csv
You can proceed with merging
This reverts commit d0e78a9.
6603c08
to
b83c587
Compare
Description
Shortcut
Type of change
Change our H3 functions to use Snowflakes new native H3 functions.
Acceptance
View or run the snowflake_test.sh benchmark test script (available here - https://app.shortcut.com/cartoteam/story/391762/run-benchmarks-with-new-at-snowflake-h3-functions). It runs each of the re-implemented functions on 'main' and this branch and dumps execution times to CSV.