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

[native] Function array_cum_sum does not support decimal array inputs #24402

Open
pramodsatya opened this issue Jan 20, 2025 · 3 comments
Open

Comments

@pramodsatya
Copy link
Contributor

Prestissimo does not support decimal array inputs for function array_cum_sum. The following Sql fails in Prestissimo:

select array_cum_sum(k) from (values (array[cast(5.1 as decimal(38, 1)), 6, 0]), (ARRAY[]), (CAST(NULL AS array(decimal)))) t(k);

Your Environment

  • Presto version used: latest
  • Storage (HDFS/S3/GCS..):
  • Data source and connector used:
  • Deployment (Cloud or On-prem):
  • Pastebin link to the complete debug logs:

Expected Behavior

values array[cast(5.1 as decimal), cast(11.1 as decimal), cast(11.1 as decimal)], array[], null

Current Behavior

VeloxUserError:  Scalar function presto.default.array_cum_sum not registered with arguments: (ARRAY<DECIMAL(38, 1)>). Found function registered with the following signatures:
((array(double)) -> array(double))
((array(real)) -> array(real))
((array(bigint)) -> array(bigint))
((array(smallint)) -> array(smallint))
((array(integer)) -> array(integer))
((array(hugeint)) -> array(hugeint))
((array(tinyint)) -> array(tinyint))
@PUSHKAR99055
Copy link

PUSHKAR99055 commented Feb 5, 2025

Hi @pramodsatya, Is this what you intended to do?

presto> select array_cum_sum(ARRAY[cast(5.1 as decimal(38, 1)), 6, 0]);
_col0

[5.1, 11.1, 11.1]
(1 row)

Image

@pramodsatya
Copy link
Contributor Author

pramodsatya commented Feb 5, 2025

Yes @PUSHKAR99055. Did you run above query in Presto C++?

@PUSHKAR99055
Copy link

No standard Presto command-line interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 Unprioritized
Development

No branches or pull requests

2 participants