gargvishesh commented on code in PR #16846:
URL: https://github.com/apache/druid/pull/16846#discussion_r1705064195
##########
server/src/test/java/org/apache/druid/client/indexing/ClientCompactionRunnerInfoTest.java:
##########
@@ -148,6 +148,49 @@ public void
testMSQEngineWithRollupFalseWithMetricsSpecIsInvalid()
);
}
+ @Test
+ public void testMSQEngineWithRollupTrueWithoutMetricsSpecIsInvalid()
+ {
+ DataSourceCompactionConfig compactionConfig = createCompactionConfig(
+ new DynamicPartitionsSpec(3, null),
+ Collections.emptyMap(),
+ new UserCompactionTaskGranularityConfig(null, null, true),
+ null
+ );
+ CompactionConfigValidationResult validationResult =
ClientCompactionRunnerInfo.validateCompactionConfig(
+ compactionConfig,
+ CompactionEngine.NATIVE
+ );
+ Assert.assertFalse(validationResult.isValid());
+ Assert.assertEquals(
+ "MSQ: 'granularitySpec.rollup' must be false if 'metricsSpec' is null",
+ validationResult.getReason()
+ );
+ }
+
+ @Test
+ public void testMSQEngineWithUnsupportedMetricsSpecIsInValid()
+ {
+ // Aggregators having combiningFactory different from the
aggregatorFactory are unsupported.
+ final String inputColName = "added";
+ final String outputColName = "sum_added";
+ DataSourceCompactionConfig compactionConfig = createCompactionConfig(
Review Comment:
Done
--
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]