Skip to content

slice: Presto throws while Velox outputs #12782

Open
@peterenescu

Description

@peterenescu

Description

Function slice fails in Presto but output in Velox, despite bad input. Reproduction listed below, curiously if you change the bitwise_not calls with a negative integer (like -1), they will both fail.

Error Reproduction

Velox outputs

presto:di> SELECT slice(c0, bitwise_not(SMALLINT '11441'), bitwise_not(SMALLINT '11441')) from (values (array[1,2,3])) t(c0);
 _col0                
-------
 []    
(1 row)

Presto throws:

presto:tpch> SELECT slice(c0, bitwise_not(SMALLINT '11441'), bitwise_not(SMALLINT '11441')) from (values (array[1,2,3,3,4,66,7,12345667])) t(c0);

Query 20250324_205628_20890_kxp7g, FAILED, 1 node
Splits: 17 total, 0 done (0.00%)
[Latency: client-side: 48ms, server-side: 30ms] [0 rows, 0B] [0 rows/s, 0B/s]

Query 20250324_205628_20890_kxp7g failed: length must be greater than or equal to 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions