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

Query fail with error failed: at index 1 #23613

Open
malwaregarry opened this issue Sep 10, 2024 · 3 comments
Open

Query fail with error failed: at index 1 #23613

malwaregarry opened this issue Sep 10, 2024 · 3 comments
Labels

Comments

@malwaregarry
Copy link

malwaregarry commented Sep 10, 2024

Your Environment

  • Presto version used: 0.288 docker image
  • Storage (HDFS/S3/GCS..):
  • Data source and connector used: Memory connector
  • Deployment (Cloud or On-prem): On-prem
  • Pastebin link to the complete debug logs: https://pastebin.com/Duaea2PE

Expected Behavior

Should return true or provide a more meaningful error message

Current Behavior

returns error Query 20240910_100645_00342_v3b4v failed: at index 1

Possible Solution

Steps to Reproduce

The select query returns an error:

select (CASE (CASE true WHEN (true) THEN (true) ELSE coalesce((false = ANY (VALUES true)), (true)) END ) WHEN false THEN true END );

The subquery returns true:

select CASE true WHEN (true) THEN (true) ELSE coalesce((false = ANY (VALUES true)), (true)) END ;

Changing false = ANY (VALUES true)), false also results in no errors:

select (CASE (CASE true WHEN (true) THEN (true) ELSE coalesce((false), (true)) END ) WHEN false THEN true END );

Screenshots (if appropriate)

Context

Test case generated from SQLancer

@tdcmeehan
Copy link
Contributor

@malwaregarry Did you post the right failure query? I am unable to reproduce, and I think all 3 queries you posted are identical.

@malwaregarry
Copy link
Author

@tdcmeehan sorry the 2nd and 3rd queries were incorrect, but the first one should cause an error.

This is the command I used to start presto
docker run -p 8080:8080 -d -v ./memory.properties:/opt/presto-server/etc/catalog/memory.properties --name presto prestodb/presto:0.288

with the memory.property file having:

connector.name=memory
memory.max-data-per-node=128MB

@tdcmeehan
Copy link
Contributor

#23629 fixes this. Thanks for the report @malwaregarry!

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

No branches or pull requests

2 participants