From bd7a49bd49e9fd4fab4e995006dfb612b0f65cf8 Mon Sep 17 00:00:00 2001 From: Zoltan Haindrich Date: Fri, 25 Aug 2023 10:01:09 +0000 Subject: [PATCH] test --- .../sql/calcite/CalciteSelectQueryTest.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/sql/src/test/java/org/apache/druid/sql/calcite/CalciteSelectQueryTest.java b/sql/src/test/java/org/apache/druid/sql/calcite/CalciteSelectQueryTest.java index 0c314dfa4a1..97b520fc178 100644 --- a/sql/src/test/java/org/apache/druid/sql/calcite/CalciteSelectQueryTest.java +++ b/sql/src/test/java/org/apache/druid/sql/calcite/CalciteSelectQueryTest.java @@ -34,7 +34,6 @@ import org.apache.druid.query.LookupDataSource; import org.apache.druid.query.QueryDataSource; import org.apache.druid.query.aggregation.CountAggregatorFactory; import org.apache.druid.query.aggregation.DoubleSumAggregatorFactory; -import org.apache.druid.query.aggregation.last.StringLastAggregatorFactory; import org.apache.druid.query.dimension.DefaultDimensionSpec; import org.apache.druid.query.extraction.SubstringDimExtractionFn; import org.apache.druid.query.groupby.GroupByQuery; @@ -1942,28 +1941,29 @@ public class CalciteSelectQueryTest extends BaseCalciteQueryTest .sql("SELECT\n" + " channel\n" + " ,cityName\n" +// + " ,LATEST_BY(\"cityName\", __time, 128) as latest_by_time_page\n" + " ,LATEST_BY(\"cityName\", TIMESTAMPADD(HOUR, 1, \"__time\"), 128) as latest_by_time_page\n" + "FROM druid.wikipedia\n" - + "where channel < '#b' and cityName < 'D'\n" + + "where channel < '#b' and cityName < 'B'\n" + "GROUP BY 1,2" ) - .expectedQueries( - ImmutableList.of( - GroupByQuery.builder() - .setDataSource("wikipedia") - .setInterval(querySegmentSpec(Filtration.eternity())) - .setGranularity(Granularities.ALL) - .setVirtualColumns( - expressionVirtualColumn("v0", "(\"__time\" + 3600000)", ColumnType.LONG)) - .setDimensions(dimensions(new DefaultDimensionSpec("channel", "d0"), - new DefaultDimensionSpec("cityName", "d1"))) - .setDimFilter( - and( - range("channel", ColumnType.STRING, null, "#b", false, true), - range("cityName", ColumnType.STRING, null, "D", false, true))) - .setAggregatorSpecs(new StringLastAggregatorFactory("a0", "cityName", "a0", 128)) - .setContext(QUERY_CONTEXT_DEFAULT) - .build())) +// .expectedQueries( +// ImmutableList.of( +// GroupByQuery.builder() +// .setDataSource("wikipedia") +// .setInterval(querySegmentSpec(Filtration.eternity())) +// .setGranularity(Granularities.ALL) +// .setVirtualColumns( +// expressionVirtualColumn("v0", "(\"__time\" + 3600000)", ColumnType.LONG)) +// .setDimensions(dimensions(new DefaultDimensionSpec("channel", "d0"), +// new DefaultDimensionSpec("cityName", "d1"))) +// .setDimFilter( +// and( +// range("channel", ColumnType.STRING, null, "#b", false, true), +// range("cityName", ColumnType.STRING, null, "B", false, true))) +// .setAggregatorSpecs(new StringLastAggregatorFactory("a0", "cityName", "a0", 128)) +// .setContext(QUERY_CONTEXT_DEFAULT) +// .build())) .expectedResults(ImmutableList.of( new Object[] {0L})) .run();