class_docstr: This handler handles connection and execution of the Dremio statements.
docstr: Receive raw query and act upon it somehow.
  Args:
      query (str): query in native format
  Returns:
      HandlerResponse
docstr_tok: ["Receive","raw","query","and","act","upon","it","somehow",".","Args",":","query","(","str",")",":","query","in","native","format","Returns",":","HandlerResponse"]
code: def native_query(self, query: str) -> StatusResponse:
      """
      Receive raw query and act upon it somehow.
      Args:
          query (str): query in native format
      Returns:
          HandlerResponse
      """
  
      query = query.replace('"', '\\"').replace("\n", " ")
  
      need_to_close = self.is_connected is False
  
      auth_headers = self.connect()
      data = "{" + f'"sql": "{query}"' + "}"
  
      try:
          sql_result = requests.post(
              self.base_url + "/api/v3/sql",
              headers=auth_headers,
              data=data,
          )
  
          job_id = sql_result.json()["id"]
  
          if sql_result.status_code == 200:
              logger.info(
                  "Job creation successful. Job id is: " + job_id
              )
          else:
              logger.info("Job creation failed.")
  
          logger.info("Waiting for the job to complete...")
  
          job_status = requests.request(
              "GET",
              self.base_url + "/api/v3/job/" + job_id,
              headers=auth_headers,
          ).json()["jobState"]
  
          while job_status != "COMPLETED":
              time.sleep(2)
              job_status = requests.request(
                  "GET",
                  self.base_url + "/api/v3/job/" + job_id,
                  headers=auth_headers,
              ).json()["jobState"]
  
          job_result = json.loads(
              requests.request(
                  "GET",
                  self.base_url + "/api/v3/job/" + job_id + "/results",
                  headers=auth_headers,
              ).text
          )
  
          if "errorMessage" not in job_result:
              response = Response(
                  RESPONSE_TYPE.TABLE,
                  data_frame=pd.DataFrame(job_result["rows"]),
              )
          else:
              response = Response(
                  RESPONSE_TYPE.ERROR,
                  error_message=str(job_result["errorMessage"]),
              )
  
      except Exception as e:
          logger.error(f"Error running query: {query} on Dremio!")
          response = Response(RESPONSE_TYPE.ERROR, error_message=str(e))
  
      if need_to_close is True:
          self.disconnect()
  
      return response
  
imports: from typing import Optional
  from collections import OrderedDict
  import json
  import time
  import requests
  import pandas
  from mindsdb_sql import parse_sql
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb.integrations.libs.base import DatabaseHandler
  from sqlalchemy_dremio.base import DremioDialect
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb.utilities import log
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
label_desc: Use image node_id 6 for calling the DremioHandler obj's underlying member method code with example usage: obj.native_query(query) and returns: response