aliehsaeedii commented on code in PR #21599:
URL: https://github.com/apache/kafka/pull/21599#discussion_r2910723189
##########
streams/src/main/java/org/apache/kafka/streams/state/BuiltInDslStoreSuppliers.java:
##########
@@ -53,27 +53,43 @@ public KeyValueBytesStoreSupplier keyValueStore(final
DslKeyValueParams params)
@Override
public WindowBytesStoreSupplier windowStore(final DslWindowParams
params) {
+ final DslStoreFormat storeFormat = params.dslStoreFormat();
if (params.emitStrategy().type() ==
EmitStrategy.StrategyType.ON_WINDOW_CLOSE) {
+ final boolean withHeaders = (storeFormat ==
DslStoreFormat.HEADERS);
return
RocksDbIndexedTimeOrderedWindowBytesStoreSupplier.create(
params.name(),
params.retentionPeriod(),
params.windowSize(),
params.retainDuplicates(),
- params.isSlidingWindow());
+ params.isSlidingWindow(),
+ withHeaders);
}
- if (params.isTimestamped()) {
+ if (storeFormat == null || storeFormat ==
DslStoreFormat.TIMESTAMPED) {
return Stores.persistentTimestampedWindowStore(
+ params.name(),
+ params.retentionPeriod(),
+ params.windowSize(),
+ params.retainDuplicates());
+ }
+
+ switch (storeFormat) {
Review Comment:
Why swithc case does not cover all 3 cases?
##########
streams/src/main/java/org/apache/kafka/streams/state/BuiltInDslStoreSuppliers.java:
##########
@@ -53,27 +53,43 @@ public KeyValueBytesStoreSupplier keyValueStore(final
DslKeyValueParams params)
@Override
public WindowBytesStoreSupplier windowStore(final DslWindowParams
params) {
+ final DslStoreFormat storeFormat = params.dslStoreFormat();
if (params.emitStrategy().type() ==
EmitStrategy.StrategyType.ON_WINDOW_CLOSE) {
+ final boolean withHeaders = (storeFormat ==
DslStoreFormat.HEADERS);
return
RocksDbIndexedTimeOrderedWindowBytesStoreSupplier.create(
params.name(),
params.retentionPeriod(),
params.windowSize(),
params.retainDuplicates(),
- params.isSlidingWindow());
+ params.isSlidingWindow(),
+ withHeaders);
}
- if (params.isTimestamped()) {
+ if (storeFormat == null || storeFormat ==
DslStoreFormat.TIMESTAMPED) {
return Stores.persistentTimestampedWindowStore(
+ params.name(),
+ params.retentionPeriod(),
+ params.windowSize(),
+ params.retainDuplicates());
+ }
+
+ switch (storeFormat) {
Review Comment:
Why swith case does not cover all 3 cases?
--
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]