class_docstr: A table schema that represents a table's structure with field names and data types.
class_docstr_tok: ["A","table","schema","that","represents","a","table","'s","structure","with","field","names","and","data","types","."]
code: def __init__(
      self,
      field_names: List[str] = None,
      data_types: List[DataType] = None,
      j_table_schema=None,
  ):
      if j_table_schema is None:
          gateway = get_gateway()
          j_field_names = to_jarray(gateway.jvm.String, field_names)
          j_data_types = to_jarray(
              gateway.jvm.DataType,
              [_to_java_data_type(item) for item in data_types],
          )
          self._j_table_schema = (
              gateway.jvm.TableSchema.builder()
              .fields(j_field_names, j_data_types)
              .build()
          )
      else:
          self._j_table_schema = j_table_schema
  
file_path: flink/flink-python/pyflink/table/table_schema.py
imports: from typing import List, Optional, Union
  from pyflink.java_gateway import get_gateway
  from pyflink.table.types import DataType, RowType, _to_java_data_type, _from_java_data_type
  from pyflink.util.java_utils import to_jarray
label_desc: Use image node_id 1 to create a new TableSchema object from inherited base classes: object with example: obj = TableSchema(field_names, data_types, j_table_schema)