def async_execute(query)
      @logger.info("Executing query asynchronously: #{query}")
      exec_result = @client.ExecuteStatement(
        Hive2::Thrift::TExecuteStatementReq.new(
          sessionHandle: @session.sessionHandle,
          statement: query,
          runAsync: true
        )
      )
      raise_error_if_failed!(exec_result)
      op_handle = exec_result.operationHandle

      # Return handles to get hold of this query / session again
      {
        session: @session.sessionHandle, 
        guid: op_handle.operationId.guid, 
        secret: op_handle.operationId.secret
      }
    end
def async_execute(query)
      @logger.info("Executing query asynchronously: #{query}")
      exec_result = @client.ExecuteStatement(
        Hive2::Thrift::TExecuteStatementReq.new(
          sessionHandle: @session.sessionHandle,
          statement: query,
          runAsync: true
        )
      )
      raise_error_if_failed!(exec_result)
      op_handle = exec_result.operationHandle

      # Return handles to get hold of this query / session again
      {
        session: @session.sessionHandle, 
        guid: op_handle.operationId.guid, 
        secret: op_handle.operationId.secret
      }
    end
Async execute