rkhachatryan commented on code in PR #27070:
URL: https://github.com/apache/flink/pull/27070#discussion_r2435832216
##########
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/operators/sink/SinkUpsertMaterializerTest.java:
##########
@@ -360,8 +409,44 @@ private OneInputStreamOperator<RowData, RowData>
createOperatorWithoutUpsertKey(
private OneInputStreamOperator<RowData, RowData> createOperator(
LogicalType[] types, int... upsertKey) {
- return SinkUpsertMaterializer.create(
- TTL_CONFIG, RowType.of(types), EQUALISER,
UPSERT_KEY_EQUALISER, upsertKey);
+ switch (strategy) {
+ case LEGACY:
+ return SinkUpsertMaterializer.create(
+ TTL_CONFIG, RowType.of(types), EQUALISER,
UPSERT_KEY_EQUALISER, upsertKey);
+ case MAP:
+ return createV2(
+ types,
+ upsertKey,
+ SequencedMultiSetStateConfig.forMap(
+ PROCESSING_TIME, StateTtlConfig.DISABLED));
+ case VALUE:
+ return createV2(
+ types,
+ upsertKey,
+ SequencedMultiSetStateConfig.forValue(
+ PROCESSING_TIME, StateTtlConfig.DISABLED));
+ case ADAPTIVE:
+ return createV2(
+ types,
+ upsertKey,
+ SequencedMultiSetStateConfig.adaptive(
+ PROCESSING_TIME, 10L, 5L,
StateTtlConfig.DISABLED));
Review Comment:
Makes sense, extracting the method
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]