You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "kgyrtkirk (via GitHub)" <gi...@apache.org> on 2025/03/19 13:23:59 UTC
[PR] Make MSQ tests use the same datasets as other similar tests (druid)
kgyrtkirk opened a new pull request, #17818:
URL: https://github.com/apache/druid/pull/17818
MSQ test had their own way of creating the segments/etc - this have lead to that `datasets` didn't worked with them.
This patch alters a few things to make it easy to access the required `CompleteSegment` entries - which enabled the removal of the extra loading codes.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Make MSQ tests use the same datasets as other similar tests (druid)
Posted by "cryptoe (via GitHub)" <gi...@apache.org>.
cryptoe commented on code in PR #17818:
URL: https://github.com/apache/druid/pull/17818#discussion_r2003400986
##########
extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/test/CalciteMSQTestsHelper.java:
##########
@@ -272,264 +223,4 @@ private static DataServerQueryHandlerFactory getTestDataServerQueryHandlerFactor
doReturn(dataServerQueryHandler).when(mockFactory).createDataServerQueryHandler(anyString(), any(), any());
return mockFactory;
}
-
- protected static CompleteSegment getSupplierForSegment(
- Function<String, File> tempFolderProducer,
- SegmentId segmentId
- )
- {
- final QueryableIndex index;
- switch (segmentId.getDataSource()) {
- case WIKIPEDIA:
- try {
- final File directory = new File(tempFolderProducer.apply("tmpDir"), StringUtils.format("wikipedia-index-%s", UUID.randomUUID()));
- final IncrementalIndex incrementalIndex = TestIndex.makeWikipediaIncrementalIndex();
- TestIndex.INDEX_MERGER.persist(incrementalIndex, directory, IndexSpec.DEFAULT, null);
- index = TestIndex.INDEX_IO.loadIndex(directory);
- }
- catch (Exception e) {
- throw new RuntimeException(e);
- }
- break;
- case DATASOURCE1:
- IncrementalIndexSchema foo1Schema = new IncrementalIndexSchema.Builder()
- .withMetrics(
- new CountAggregatorFactory("cnt"),
- new FloatSumAggregatorFactory("m1", "m1"),
- new DoubleSumAggregatorFactory("m2", "m2"),
- new HyperUniquesAggregatorFactory("unique_dim1", "dim1")
- )
- .withRollup(false)
- .build();
- index = IndexBuilder
- .create()
- .tmpDir(tempFolderProducer.apply("tmpDir"))
- .segmentWriteOutMediumFactory(OffHeapMemorySegmentWriteOutMediumFactory.instance())
- .schema(foo1Schema)
- .rows(ROWS1)
- .buildMMappedIndex();
- break;
- case DATASOURCE2:
Review Comment:
I always wanted to remove this. Thanks for taking this up.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Make MSQ tests use the same datasets as other similar tests (druid)
Posted by "kgyrtkirk (via GitHub)" <gi...@apache.org>.
kgyrtkirk merged PR #17818:
URL: https://github.com/apache/druid/pull/17818
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Make MSQ tests use the same datasets as other similar tests (druid)
Posted by "cryptoe (via GitHub)" <gi...@apache.org>.
cryptoe commented on PR #17818:
URL: https://github.com/apache/druid/pull/17818#issuecomment-2736753131
CI failures look legit.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org