Class SelectedCellTableSchema
java.lang.Object
io.github.flink.gcp.connector.bigtable.table.SelectedCellTableSchema
The physical primary key, the value-format payload and the commit columns of a selected-cell
table.
The commit columns are physical rather than metadata columns on purpose. Reading a metadata
column of an upsert source makes the Flink planner keep a ChangelogNormalize operator,
which completes a key-only delete from the last row it holds, so the delete carries the commit
timestamp of the change it deletes. Flink 2.x drops that operator when the query reads only
physical columns, and a delete then reaches the sink with its own commit timestamp and tie
breaker (#1960).
-
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns the physical position of the commit-timestamp column, or-1for none.org.apache.flink.table.types.DataTypeint[]Returns the physical position of each payload field, in payload order.org.apache.flink.table.types.DataTypeintorg.apache.flink.table.types.logical.LogicalTypeintReturns the physical position of the tie-breaker column, or-1for none.inthashCode()static SelectedCellTableSchemaof(org.apache.flink.table.types.DataType physicalDataType, int[] primaryKeyIndexes, String commitTimestampColumn, String tieBreakerColumn) Derives the format payload by removing the one declared primary-key field and the named commit columns.
-
Method Details
-
of
public static SelectedCellTableSchema of(org.apache.flink.table.types.DataType physicalDataType, int[] primaryKeyIndexes, @Nullable String commitTimestampColumn, @Nullable String tieBreakerColumn) Derives the format payload by removing the one declared primary-key field and the named commit columns.- Parameters:
commitTimestampColumn- the physical column the source fills with the mutation's commit timestamp, ornullfor nonetieBreakerColumn- the physical column the source fills with the mutation's tie breaker, ornullfor none
-
getPhysicalDataType
public org.apache.flink.table.types.DataType getPhysicalDataType() -
getPayloadDataType
public org.apache.flink.table.types.DataType getPayloadDataType() -
getPrimaryKeyIndex
public int getPrimaryKeyIndex() -
getPrimaryKeyType
public org.apache.flink.table.types.logical.LogicalType getPrimaryKeyType() -
getPayloadPhysicalIndexes
public int[] getPayloadPhysicalIndexes()Returns the physical position of each payload field, in payload order. -
getCommitTimestampIndex
public int getCommitTimestampIndex()Returns the physical position of the commit-timestamp column, or-1for none. -
getTieBreakerIndex
public int getTieBreakerIndex()Returns the physical position of the tie-breaker column, or-1for none. -
equals
-
hashCode
public int hashCode()
-