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","."]
docstr: Returns the specified data type for the given field index or field name.
  
  :param field: The index of the field or the name of the field.
  :return: The data type of the specified field.
docstr_tok: ["Returns","the","specified","data","type","for","the","given","field","index","or","field","name",".",":","param","field",":","The","index","of","the","field","or","the","name","of","the","field",".",":","return",":","The","data","type","of","the","specified","field","."]
code: def get_field_data_type(
      self, field: Union[int, str]
  ) -> Optional[DataType]:
      """
      Returns the specified data type for the given field index or field name.
  
      :param field: The index of the field or the name of the field.
      :return: The data type of the specified field.
      """
      if not isinstance(field, (int, str)):
          raise TypeError(
              "Expected field index or field name, got %s" % type(field)
          )
      optional_result = self._j_table_schema.getFieldDataType(field)
      if optional_result.isPresent():
          return _from_java_data_type(optional_result.get())
      else:
          return None
  
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 4 for calling the TableSchema obj's underlying member method code with example usage: obj.get_field_data_type(field) and returns: _from_java_data_type, None