Class FlightSqlColumnMetadata

java.lang.Object
org.apache.arrow.flight.sql.FlightSqlColumnMetadata

public class FlightSqlColumnMetadata extends Object
Metadata for a column in a Flight SQL query.

This can be used with FlightSqlClient to access column's metadata contained in schemas returned by GetTables and query execution as follows:

   FlightSqlColumnMetadata metadata = new FlightSqlColumnMetadata(field.getMetadata());
   Integer precision = metadata.getPrecision();
 
FlightSqlProducer can use this to set metadata on a column in a schema as follows:
   FlightSqlColumnMetadata metadata = new FlightSqlColumnMetadata.Builder()
         .precision(10)
         .scale(5)
         .build();
   Field field = new Field("column", new FieldType(..., metadata.getMetadataMap()), null);
 
  • Constructor Details

    • FlightSqlColumnMetadata

      public FlightSqlColumnMetadata(Map<String,String> metadataMap)
      Creates a new instance of FlightSqlColumnMetadata.
  • Method Details

    • getMetadataMap

      public Map<String,String> getMetadataMap()
      Returns the metadata map.
      Returns:
      The metadata map.
    • getCatalogName

      public String getCatalogName()
      Returns the catalog name.
      Returns:
      The catalog name.
    • getSchemaName

      public String getSchemaName()
      Returns the schema name.
      Returns:
      The schema name.
    • getTableName

      public String getTableName()
      Returns the table name.
      Returns:
      The table name.
    • getTypeName

      public String getTypeName()
      Returns the type name.
      Returns:
      The type name.
    • getPrecision

      public Integer getPrecision()
      Returns the precision / column size.
      Returns:
      The precision / column size.
    • getScale

      public Integer getScale()
      Returns the scale / decimal digits.
      Returns:
      The scale / decimal digits.
    • isAutoIncrement

      public Boolean isAutoIncrement()
      Returns if the column is auto incremented.
      Returns:
      True if the column is auto incremented, false otherwise.
    • isCaseSensitive

      public Boolean isCaseSensitive()
      Returns if the column is case-sensitive.
      Returns:
      True if the column is case-sensitive, false otherwise.
    • isReadOnly

      public Boolean isReadOnly()
      Returns if the column is read only.
      Returns:
      True if the column is read only, false otherwise.
    • isSearchable

      public Boolean isSearchable()
      Returns if the column is searchable.
      Returns:
      True if the column is searchable, false otherwise.