Skip to content
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

[Good First Issue] Support All SQL Functions in Other SQL System #48203

Open
1 of 23 tasks
zclllyybb opened this issue Feb 22, 2025 · 27 comments · May be fixed by #48695
Open
1 of 23 tasks

[Good First Issue] Support All SQL Functions in Other SQL System #48203

zclllyybb opened this issue Feb 22, 2025 · 27 comments · May be fixed by #48695

Comments

@zclllyybb
Copy link
Contributor

zclllyybb commented Feb 22, 2025

Search before asking

  • I had searched in the issues and found no similar issues.

Description

We plan to implement all SQL functions in other famous DBs, like MySQL, PG, Trino, CK, Hive, and more. Facilitate the users to migrate to Doris. They're very suitable for newcomers as your first Doris PR. So here's the list. Feel free to comment to pick anyone! If one is picked, I will tick it.

Part I. Hive

See the newest Hive document for these functions' explanation.

Part II. Trino

  • regexp_count, regexp_position, regexp_split
  • hamming_distance (better with levenshtein together) @lichenran0330
  • human_readable_seconds @ChenMiaoi
  • timezone_hour, timezone_minute
  • GEO FUNCTIONS
    • ST_GeomFromKML
    • ST_Equals, ST_Relate
    • ST_Intersects, ST_Disjoint, ST_Touches @koi2000
    • ST_Crosses, ST_Overlaps
  • ARRAY FUNCTIONS
  • bool_or, bool_and (aggregate function)

More tasks is coming...

Solution

All the guidelines to implement an SQL function are in #48201. Please take a carefully look at!

@noixcn
Copy link

noixcn commented Feb 22, 2025

I'd like to take context_ngrams, if that's okay.

@cypppper
Copy link

I want to take mask_hash

@lichenran0330
Copy link

I'd like to take levenshtein, if that's okay.

@Czylm
Copy link

Czylm commented Feb 22, 2025

I'd like to factorial, if that's okay.

@zclllyybb
Copy link
Contributor Author

@noixcn @cypppper @lichenran0330 @Czylm done!

@meox3259
Copy link

I'd like to take inline, if that's okay.

@koi2000
Copy link

koi2000 commented Feb 23, 2025

I'd like to take soundex, if that's okay.

@CookiePieWw
Copy link

I'd like to take str_to_map :)

@zclllyybb
Copy link
Contributor Author

@meox3259 @koi2000 @cypppper sorry guys, but those functions we decide not to impl. maybe you can choose others!

@koi2000
Copy link

koi2000 commented Feb 23, 2025

I'd like to take length, if that's okay.

@zclllyybb
Copy link
Contributor Author

I'd like to take length, if that's okay.

removed for it's been found implemented. but I added many others. take a look!

@zclllyybb
Copy link
Contributor Author

I'd like to take str_to_map :)

assigned!

@zclllyybb
Copy link
Contributor Author

I'd like to take levenshtein, if that's okay.

would you like to implement hamming_distance together?

@cypppper
Copy link

Can I take ARRAY FUNCTIONS::reduce (lambda function) in Trino?

@koi2000
Copy link

koi2000 commented Feb 23, 2025

Can I take ST_Intersects, ST_Disjoint, ST_Touches in GEO FUNCTIONS?

@lichenran0330
Copy link

I'd like to take levenshtein, if that's okay.

would you like to implement hamming_distance together?

Sure!

@zclllyybb
Copy link
Contributor Author

@cypppper @koi2000 @lichenran0330 assigned!

@koi2000 try to understand the library S2 we used to implement geometry functions and choose the proper interface to achieve this.

@cypppper lambda functions are a bit different from normal functions, see https://github.com/apache/doris/pull/40605/files for more details.

@meox3259
Copy link

I'd like to take dot_product, if that's okay.

@zclllyybb
Copy link
Contributor Author

I'd like to take dot_product, if that's okay.

assigned

@ChenMiaoi
Copy link

i'd like to take the task like sinh etc.

@zclllyybb
Copy link
Contributor Author

i'd like to take the task like sinh etc.

assigned

@ayepei
Copy link

ayepei commented Feb 25, 2025

I'd like to take trim_array, if that's okay.

@zclllyybb
Copy link
Contributor Author

I'd like to take trim_array, if that's okay.

assigned

ChenMiaoi added a commit to ChenMiaoi/doris that referenced this issue Feb 28, 2025
ChenMiaoi added a commit to ChenMiaoi/doris that referenced this issue Feb 28, 2025
ChenMiaoi added a commit to ChenMiaoi/doris that referenced this issue Feb 28, 2025
ChenMiaoi added a commit to ChenMiaoi/doris that referenced this issue Feb 28, 2025
ChenMiaoi added a commit to ChenMiaoi/doris that referenced this issue Feb 28, 2025
@ChenMiaoi
Copy link

if no one to do human_readable_seconds function, can I do this?

@delayyyyyyy
Copy link

I'd like to take combinations, if that's okay.

@zclllyybb
Copy link
Contributor Author

@ChenMiaoi @delayyyyyyy assigned

koi2000 added a commit to koi2000/doris that referenced this issue Mar 5, 2025
koi2000 added a commit to koi2000/doris that referenced this issue Mar 5, 2025
@koi2000 koi2000 linked a pull request Mar 5, 2025 that will close this issue
16 tasks
@Kosthi
Copy link

Kosthi commented Mar 9, 2025

I'd like to take ST_GeomFromKML, if that's okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.