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

year: Velox throws while Presto handles extreme values #12555

Open
peterenescu opened this issue Mar 5, 2025 · 1 comment
Open

year: Velox throws while Presto handles extreme values #12555

peterenescu opened this issue Mar 5, 2025 · 1 comment
Labels
bug Something isn't working fuzzer-found

Comments

@peterenescu
Copy link
Contributor

peterenescu commented Mar 5, 2025

Description

Presto and Velox error handling mismatch for function year. Velox appears to not accept narrow range compared to Presto.

Error Reproduction

presto:tpch> SELECT year(from_unixtime(pow(c0,c1))) from (values (BIGINT '9145576202630572736', BIGINT '1109263411131782511')) t(c0, c1);
   _col0   
-----------
 292278994 
(1 row)
presto:di> SELECT year(from_unixtime(pow(c0,c1))) from (values (BIGINT '9145576202630572736', BIGINT '1109263411131782511')) t(c0, c1);
Query 20250305_220032_43828_nqej6 failed:  Timepoint is outside of supported year range: [-32767, 32767], got -1701532 Top-level Expression: presto.default.year(presto.default.from_unixtime(presto.default.pow(cast((field) as DOUBLE), cast((field_0) as DOUBLE)))). Input data: /tmp/velox_vector_jKIPoH. SQL expression: /tmp/velox_sql_Wmq9Cc. All SQL expressions: /tmp/velox_allExprSql_kTYkqt.  Operator: FilterProject[4] 1
@peterenescu peterenescu added bug Something isn't working fuzzer-found labels Mar 5, 2025
@peterenescu
Copy link
Contributor Author

Also affects function year_of_week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuzzer-found
Projects
None yet
Development

No branches or pull requests

1 participant