def ParseQuery(query):
  """Parses the entire query.

  Arguments:
    query: The command the user sent that needs to be parsed.

  Returns:
    Dictionary mapping clause names to their arguments.

  Raises:
    bigquery_client.BigqueryInvalidQueryError: When invalid query is given.
  """
  clause_arguments = {
      'SELECT': [],
      'AS': {},
      'WITHIN': {},
      'FROM': [],
      'WHERE': [],
      'HAVING': [],
      'GROUP BY': [],
      'ORDER BY': [],
      'LIMIT': [],
  }
  try:
    _EBQParser(clause_arguments).parseString(query)
  except __HOLE__ as e:
    raise bigquery_client.BigqueryInvalidQueryError(e, None, None, None)
  return clause_arguments
dataset/ETHPy150Open google/encrypted-bigquery-client/src/query_parser.py/ParseQuery