Skip to content

cursor doesn't respond/raise exceptions when a query is cancelled in the backend #470

Open
@ganeshdogiparthi-db

Description

@ganeshdogiparthi-db

Hi Team,
We have observed that the cursor doesn't respond/raise exceptions when a query is cancelled in the backend it just hangs (keeps on running)
I don't see any solutions online.
Any idea on how to handle this?

 conn= connection(connection_params)
  cursor = conn.cursor()
  c = cursor.execute(query)
  print(c)
  print(c.query_id)
  print("query executed")
  query_id = cursor.query_id
  print(f"In query: {query_id}")
  result = cursor.fetchmany_arrow(100000) 
  if not result:
    raise Exception("No results")
  query_id = cursor.query_id
  print(f"In query: {query_id}")

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