class_docstr: User-facing catalog API, accessible through `SparkSession.catalog`.
  
  This is a thin wrapper around its Scala implementation org.apache.spark.sql.catalog.Catalog.
  
  .. versionchanged:: 3.4.0
      Supports Spark Connect.
class_docstr_tok: ["User-facing","catalog","API",",","accessible","through","`","SparkSession.catalog","`",".","This","is","a","thin","wrapper","around","its","Scala","implementation","org.apache.spark.sql.catalog.Catalog",".","..","versionchanged",":",":","3.4.0","Supports","Spark","Connect","."]
docstr: Returns a list of columns for the given table/view in the specified database.
  
  .. versionadded:: 2.0.0
  
  Parameters
  ----------
  tableName : str
      name of the table to list columns.
  
      .. versionchanged:: 3.4.0
         Allow ``tableName`` to be qualified with catalog name when ``dbName`` is None.
  
  dbName : str, optional
      name of the database to find the table to list columns.
  
  Returns
  -------
  list
      A list of :class:`Column`.
  
  Notes
  -----
  The order of arguments here is different from that of its JVM counterpart
  because Python does not support method overloading.
  
  If no database is specified, the current database and catalog
  are used. This API includes all temporary views.
  
  Examples
  --------
  >>> _ = spark.sql("DROP TABLE IF EXISTS tbl1")
  >>> _ = spark.sql("CREATE TABLE tblA (name STRING, age INT) USING parquet")
  >>> spark.catalog.listColumns("tblA")
  [Column(name='name', description=None, dataType='string', nullable=True, ...
  >>> _ = spark.sql("DROP TABLE tblA")
docstr_tok: ["Returns","a","list","of","columns","for","the","given","table\/view","in","the","specified","database",".","..","versionadded",":",":","2.0.0","Parameters","--","--","--","--","--","tableName",":","str","name","of","the","table","to","list","columns",".","..","versionchanged",":",":","3.4.0","Allow","``","tableName","``","to","be","qualified","with","catalog","name","when","``","dbName","``","is","None",".","dbName",":","str",",","optional","name","of","the","database","to","find","the","table","to","list","columns",".","Returns","--","--","--","-","list","A","list","of",":","class",":","`","Column","`",".","Notes","--","--","-","The","order","of","arguments","here","is","different","from","that","of","its","JVM","counterpart","because","Python","does","not","support","method","overloading",".","If","no","database","is","specified",",","the","current","database","and","catalog","are","used",".","This","API","includes","all","temporary","views",".","Examples","--","--","--","--",">",">",">","_","=","spark.sql","(","``","DROP","TABLE","IF","EXISTS","tbl1","''",")",">",">",">","_","=","spark.sql","(","``","CREATE","TABLE","tblA","(","name","STRING",",","age","INT",")","USING","parquet","''",")",">",">",">","spark.catalog.listColumns","(","``","tblA","''",")","[","Column","(","name='name","'",",","description=None",",","dataType='string","'",",","nullable=True",",","...",">",">",">","_","=","spark.sql","(","``","DROP","TABLE","tblA","''",")"]
code: def listColumns(
      self, tableName: str, dbName: Optional[str] = None
  ) -> List[Column]:
      """Returns a list of columns for the given table/view in the specified database.
  
      .. versionadded:: 2.0.0
  
      Parameters
      ----------
      tableName : str
          name of the table to list columns.
  
          .. versionchanged:: 3.4.0
             Allow ``tableName`` to be qualified with catalog name when ``dbName`` is None.
  
      dbName : str, optional
          name of the database to find the table to list columns.
  
      Returns
      -------
      list
          A list of :class:`Column`.
  
      Notes
      -----
      The order of arguments here is different from that of its JVM counterpart
      because Python does not support method overloading.
  
      If no database is specified, the current database and catalog
      are used. This API includes all temporary views.
  
      Examples
      --------
      >>> _ = spark.sql("DROP TABLE IF EXISTS tbl1")
      >>> _ = spark.sql("CREATE TABLE tblA (name STRING, age INT) USING parquet")
      >>> spark.catalog.listColumns("tblA")
      [Column(name='name', description=None, dataType='string', nullable=True, ...
      >>> _ = spark.sql("DROP TABLE tblA")
      """
      if dbName is None:
          iter = self._jcatalog.listColumns(tableName).toLocalIterator()
      else:
          warnings.warn(
              "`dbName` has been deprecated since Spark 3.4 and might be removed in "
              "a future version. Use listColumns(`dbName.tableName`) instead.",
              FutureWarning,
          )
          iter = self._jcatalog.listColumns(
              dbName, tableName
          ).toLocalIterator()
  
      columns = []
      while iter.hasNext():
          jcolumn = iter.next()
          columns.append(
              Column(
                  name=jcolumn.name(),
                  description=jcolumn.description(),
                  dataType=jcolumn.dataType(),
                  nullable=jcolumn.nullable(),
                  isPartition=jcolumn.isPartition(),
                  isBucket=jcolumn.isBucket(),
              )
          )
      return columns
  
imports: import sys
  import warnings
  from typing import Any, Callable, NamedTuple, List, Optional, TYPE_CHECKING
  from pyspark.errors import PySparkTypeError
  from pyspark.storagelevel import StorageLevel
  from pyspark.sql.dataframe import DataFrame
  from pyspark.sql.session import SparkSession
  from pyspark.sql.types import StructType
label_desc: Use image node_id 15 for calling the Catalog obj's underlying member method code with example usage: obj.listColumns(tableName, dbName) and returns: columns