Skip to content

Register prestosql scalar functions#4

Open
lgbo-ustc wants to merge 1 commit intobigo-sg:glutenfrom
lgbo-ustc:prestol_scalar_functions
Open

Register prestosql scalar functions#4
lgbo-ustc wants to merge 1 commit intobigo-sg:glutenfrom
lgbo-ustc:prestol_scalar_functions

Conversation

@lgbo-ustc
Copy link

@lgbo-ustc lgbo-ustc commented May 30, 2025

register prestosql scalar functions

To support timestamp +/- interval in apache/gluten#9781. It seems that in sparksql, there is no suitable function to achieve this.

Format codes

let the style check pass

@lgbo-ustc lgbo-ustc requested a review from shuai-xu May 30, 2025 06:37
@lgbo-ustc lgbo-ustc closed this Jun 9, 2025
@lgbo-ustc lgbo-ustc reopened this Jun 25, 2025
Copy link
Member

@zhanglistar zhanglistar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KevinyhZou
Copy link

KevinyhZou commented Sep 2, 2025

I found that we can not register presto functions by #include <velox/functions/prestosql/registration/RegistrationFunctions.h> directly, as it would register all the presto scalar functions, some are conflicted with spark's function. and this happened in gluten-flink's ut test when cast timestamp to int,

Reason: Cannot cast TIMESTAMP '2025-09-02T02:16:57.000052000' to BIGINT. Conversion from Timestamp to Int is not supported
Retriable: False
Context: cast((dateTime) as BIGINT)

The exceptions is throwed from presto's function. @lgbo-ustc

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 this pull request may close these issues.

3 participants