Skip to content

Long queries fail with uninformative exception #250

@n-splv

Description

@n-splv

This works:

with con.cursor() as cur:
    cur.execute(f'values {", ".join(map(str, range(300)))}')

this doesn't:

with con.cursor() as cur:
    cur.execute(f'values {", ".join(map(str, range(400)))}')
---------------------------------------------------------------------------
java.lang.RuntimeException                Traceback (most recent call last)
File PrestoConnection.java:142, in com.facebook.presto.jdbc.PrestoConnection.prepareStatement()

java.lang.RuntimeException: java.lang.RuntimeException: Error fetching next at https://common.olav6zt54q.cp.cvpc.lakehouse.cloud.ibm.com/v1/statement/queued/20241120_145049_12279_jum2f/2?slug=x9e146a84b5d84e6c99f1c558a287fd17 returned an invalid response: JsonResponse{statusCode=502, statusMessage=Bad Gateway, headers={connection=[keep-alive], content-length=[150], content-type=[text/html], date=[Wed, 20 Nov 2024 14:50:49 GMT]}, hasValue=false} [Error: <html>
<head><title>502 Bad Gateway<[/title](http://localhost:8888/title)><[/head](http://localhost:8888/head)>
<body>
<center><h1>502 Bad Gateway<[/h1](http://localhost:8888/h1)><[/center](http://localhost:8888/center)>
<hr><center>nginx<[/center](http://localhost:8888/center)>
<[/body](http://localhost:8888/body)>
<[/html](http://localhost:8888/html)>
]

The above exception was the direct cause of the following exception:

Exception                                 Traceback (most recent call last)
File PrestoConnection.java:142, in com.facebook.presto.jdbc.PrestoConnection.prepareStatement()

Exception: Java Exception

The issue is definitely not on the driver or server side, since I'm able to run queries of any length with DataGrip IDE, which uses the same driver and connects to the same server. Please, review your request size limit. JayDeBeApi==1.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions