navina commented on code in PR #10703:
URL: https://github.com/apache/pinot/pull/10703#discussion_r1235919388


##########
pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java:
##########
@@ -409,7 +416,62 @@ protected TableConfig createUpsertTableConfig(File 
sampleAvroFile, String primar
         .setRoutingConfig(new RoutingConfig(null, null, 
RoutingConfig.STRICT_REPLICA_GROUP_INSTANCE_SELECTOR_TYPE))
         .setSegmentPartitionConfig(new 
SegmentPartitionConfig(columnPartitionConfigMap))
         .setReplicaGroupStrategyConfig(new 
ReplicaGroupStrategyConfig(primaryKeyColumn, 1))
-        .setUpsertConfig(new UpsertConfig(UpsertConfig.Mode.FULL)).build();
+        .setUpsertConfig(upsertConfig).build();
+  }
+
+
+  protected Map<String, String> getCSVStreamConfigMap(@Nullable String 
delimiter, @Nullable String csvHeaderProperty) {
+    String streamType = "kafka";
+    Map<String, String> streamConfigsMap = new HashMap<>();
+    streamConfigsMap.put(
+        StreamConfigProperties.constructStreamProperty(streamType, 
StreamConfigProperties.STREAM_DECODER_CLASS),
+        CSVMessageDecoder.class.getName());
+    if (delimiter != null) {
+      
streamConfigsMap.put(StreamConfigProperties.constructStreamProperty(streamType, 
"decoder.prop.delimiter"),
+          delimiter);
+    }
+    if (csvHeaderProperty != null) {
+      
streamConfigsMap.put(StreamConfigProperties.constructStreamProperty(streamType, 
"decoder.prop.header"),
+          csvHeaderProperty);
+    }
+    return streamConfigsMap;
+  }
+
+  /**
+   * Creates a new Upsert enabled table config.
+   */
+  protected TableConfig createCSVUpsertTableConfig(String tableName, @Nullable 
String schemaName,

Review Comment:
   Using these overrides will require writing a separate integration test class 
for every test. I wanted to avoid that and allow creating more than 1 table for 
an integration test class. 



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to