Class SpannerTableSchemaConverter

java.lang.Object
io.github.flink.gcp.connector.spanner.table.SpannerTableSchemaConverter
All Implemented Interfaces:
Serializable

@Internal public final class SpannerTableSchemaConverter extends Object implements Serializable
The physical DDL schema and its corresponding native Spanner types.
See Also:
  • Method Details

    • of

      public static SpannerTableSchemaConverter of(org.apache.flink.table.types.logical.RowType rowType, int[] primaryKeyIndexes, com.google.cloud.spanner.Dialect dialect, List<String> jsonPaths, Map<String,String> protoTypes, Map<String,String> enumTypes)
      Parses and validates one physical table schema.
    • of

      public static SpannerTableSchemaConverter of(org.apache.flink.table.types.logical.RowType rowType, int[] primaryKeyIndexes, com.google.cloud.spanner.Dialect dialect, List<String> jsonPaths, List<String> uuidPaths, Map<String,String> protoTypes, Map<String,String> enumTypes)
      Parses and validates one physical table schema, including native UUID markers.
    • of

      public static SpannerTableSchemaConverter of(org.apache.flink.table.types.logical.RowType rowType, int[] primaryKeyIndexes, com.google.cloud.spanner.Dialect dialect, List<String> jsonPaths, List<String> uuidPaths, List<String> generatedColumns, Map<String,String> protoTypes, Map<String,String> enumTypes)
      Parses and validates one physical table schema, including the columns Spanner generates. Those are read like any column and left out of written mutations, since Spanner refuses a value for a generated column; a generated key column still keys a delete.
    • getColumns

    • getPrimaryKeyIndexes

      public int[] getPrimaryKeyIndexes()
    • hasPrimaryKey

      public boolean hasPrimaryKey()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object