Class PaimonWriterHelper

    • Constructor Detail

      • PaimonWriterHelper

        public PaimonWriterHelper()
    • Method Detail

      • createFieldGetters

        public static List<RecordData.FieldGetter> createFieldGetters​(Schema schema,
                                                                      java.time.ZoneId zoneId,
                                                                      @Nullable
                                                                      BlobWriteContext blobWriteContext)
        create a list of RecordData.FieldGetter for PaimonWriter with BLOB support.
        Parameters:
        schema - The CDC schema containing column definitions.
        zoneId - The timezone for timestamp conversion.
        blobWriteContext - Optional context for BLOB field handling.
        Returns:
        List of FieldGetter for converting CDC data to Paimon data.
      • sameColumnsIgnoreCommentAndDefaultValue

        public static Boolean sameColumnsIgnoreCommentAndDefaultValue​(Schema upstreamSchema,
                                                                      Schema physicalSchema)
        Check if the columns of upstream schema is the same as the physical schema.

        Note: Default value of column was ignored as it has no influence in createFieldGetter(DataType, int, ZoneId).

      • deduceSchemaForPaimonTable

        public static Schema deduceSchemaForPaimonTable​(org.apache.paimon.table.Table table)
        Deduce Schema for a Table.

        Note: default value was not included in the result.

      • identifierFromTableId

        public static org.apache.paimon.catalog.Identifier identifierFromTableId​(TableId tableId)