Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We give a migration plan for users who are still using TableEnvironment#connect and want to migrate to new Descriptor API. The following tables list the API changes:


Schema API Changes

Current InterfaceNew Interface
Description
.field("name", DataTypes.STRING()).column("name", DataTypes.STRING())
.field("name", "STRING").column("name", DataTypes.STRING())
.field("proctime", DataTypes.TIMESTAMP(3)).proctime().proctime("proctime")
.from("originalName").computedColumn("newName", "originalName")
.rowtime(new Rowtime().timestampsFromField("time").watermarksPeriodicAscending()).watermarkFor("time").ascendingTimestamps()
.rowtime(new Rowtime().timestampsFromField("time").watermarksPeriodicBounded(2)).watermarkFor("time").boundedOutOfOrderTimestamps(Duration.ofMillis(2))
rowtime.timestampsFromExtractor(TimestampExtractor).computedColumn(fieldName, expr).watermarkFor(fieldName)
rowtime.watermarksFromStrategy(WatermarkStrategy).watermarkFor(rowtimeField).as(watermarkExpr)
rowtime.watermarksFromSource()removed (never implemented by any connectors before)
rowtime.timestampsFromSource()removed (never implemented by any connectors before)
.toProperties()removed (not needed anymore)

ConnectTableDescriptor API Changes


Current InterfaceNew Interface
Description
.withSchema(new Schema()).schema(new Schema())
.withFormat(new Json())new Kafka().format(new Json())
Moved to speicifc connector descriptor implementations.
.withPartitionKeys(Arrays.asList(a, b, c)).partitionedBy(a, b, c)
.createTemporaryTable(path)tEnv.createTemporaryTable(path, descriptor)
Moved to TableEnvironment.
.inAppendMode()
N/A
removed (not needed anymore)
.inRetractMode()
N/A
removed (not needed anymore)
.inUpsertMode()
N/A
removed (not needed anymore)
.toProperties()
N/A
removed (not needed anymore)



Test Plan

Describe in few sentences how the FLIP will be tested. We are mostly interested in system tests (since unit-tests are specific to implementation details). How will we know that the implementation works as expected? How will we know nothing broke?

...