PrestoQuery-class function

Class to encapsulate a Presto query

Class to encapsulate a Presto query

This reference class (so that the object can be passed by reference and modified) encapsulates the lifecycle of a Presto query from its inception (by providing a PrestoConnection and a query statement) to the steps it takes to execute (i.e. an initial POST request and subsequent GET requests). class

Details

This is similar to the PrestoQuery class defined in the Presto Python client

Slots

  • .conn: A PrestoConnection object
  • .statement: The query statement
  • .id: The query ID returned after the first POST request
  • .timestamp: The timestamp of the query execution
  • .bigint: How BIGINT fields should be converted to an R class
  • .state: The query state. This changes every time the query advances to the next stage
  • .next.uri: The URI that specifies the next endpoint to send the GET request
  • .info.uri: The information URI
  • .stats: Query stats. This changes every time the query advances to the next stage
  • .response: HTTP request response. This changes when the query advances
  • .content: Parsed content from the HTTP request response
  • .fetched.row.count: How many rows of data have been fetched to R
  • .post.data.fetched: A boolean flag indicating if data returned from the POST request has been fetched
  • .quiet: If a progress bar should be shown for long queries (which run for more than 2 seconds. Default to NA which turns on the progress bar for interactive queries.
  • Maintainer: Jarod G.R. Meng
  • License: BSD_3_clause + file LICENSE
  • Last published: 2025-01-08