Skip to content

How to get infoUri before query finishes #388

@zyxue

Description

@zyxue

Expected behavior

execute returns soon after it's run so that infoUri can be available for tracking.

Actual behavior

executes is blocked until at least one row is received or query is finished or cancelled (https://github.com/trinodb/trino-python-client/blob/0.326.0/trino/client.py#L819-L821)

Steps To Reproduce

from trino.dbapi import connect

conn = connect(
    host="<host>",
    port=<port>,
    user="<username>",
    catalog="<catalog>",
    schema="<schema>",
)
cur = conn.cursor()
result = cur.execute("SELECT * FROM system.runtime.nodes") # this used to return quickly, but not anymore.

Log output

No response

Operating System

NAME="Ubuntu" VERSION="20.04.4 LTS (Focal Fossa)"

Trino Python client version

0.319.0

Trino Server version

419

Python version

3.8.13

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions