Skip to content

Commit

Permalink
Use annotation to mark DecoupleIgnore (#15005)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgyrtkirk authored Sep 21, 2023
1 parent ebb7946 commit e76962f
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 271 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,10 @@ public static Map<String, Object> getTimeseriesContextWithFloorTime(
private static SqlTestFramework queryFramework;
final boolean useDefault = NullHandling.replaceWithDefault();

@Rule
@Rule(order = 1)
public ExpectedException expectedException = ExpectedException.none();

@Rule
@Rule(order = 2)
public TemporaryFolder temporaryFolder = new TemporaryFolder();

public boolean cannotVectorize = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
import org.apache.druid.segment.column.ColumnType;
import org.apache.druid.segment.column.RowSignature;
import org.apache.druid.segment.join.JoinType;
import org.apache.druid.sql.calcite.DecoupledIgnore.Modes;
import org.apache.druid.sql.calcite.expression.DruidExpression;
import org.apache.druid.sql.calcite.filtration.Filtration;
import org.apache.druid.sql.calcite.planner.Calcites;
Expand Down Expand Up @@ -2680,6 +2681,7 @@ public void testGroupByWithSelectProjections()
);
}

@DecoupledIgnore(mode = Modes.CANNOT_CONVERT)
@Test
public void testGroupByWithSelectAndOrderByProjections()
{
Expand Down Expand Up @@ -2731,6 +2733,7 @@ public void testGroupByWithSelectAndOrderByProjections()
);
}

@DecoupledIgnore(mode = Modes.PLAN_MISMATCH)
@Test
public void testTopNWithSelectProjections()
{
Expand Down Expand Up @@ -2764,7 +2767,7 @@ public void testTopNWithSelectProjections()
);
}


@DecoupledIgnore(mode = Modes.CANNOT_CONVERT)
@Test
public void testTopNWithSelectAndOrderByProjections()
{
Expand Down Expand Up @@ -2802,6 +2805,7 @@ public void testTopNWithSelectAndOrderByProjections()
);
}

@DecoupledIgnore
@Test
public void testUnionAllQueries()
{
Expand Down Expand Up @@ -2835,6 +2839,7 @@ public void testUnionAllQueries()
);
}

@DecoupledIgnore(mode = Modes.NOT_ENOUGH_RULES)
@Test
public void testUnionAllQueriesWithLimit()
{
Expand Down Expand Up @@ -2863,6 +2868,7 @@ public void testUnionAllQueriesWithLimit()
);
}

@DecoupledIgnore
@Test
public void testUnionAllDifferentTablesWithMapping()
{
Expand Down Expand Up @@ -2906,6 +2912,7 @@ public void testUnionAllDifferentTablesWithMapping()
);
}

@DecoupledIgnore(mode = Modes.NOT_ENOUGH_RULES)
@Test
public void testJoinUnionAllDifferentTablesWithMapping()
{
Expand Down Expand Up @@ -2969,6 +2976,7 @@ public void testUnionAllTablesColumnCountMismatch()
}
}

@DecoupledIgnore(mode = Modes.NOT_ENOUGH_RULES)
@Test
public void testUnionAllTablesColumnTypeMismatchFloatLong()
{
Expand Down Expand Up @@ -3016,6 +3024,7 @@ public void testUnionAllTablesColumnTypeMismatchFloatLong()
);
}

@DecoupledIgnore(mode = Modes.ERROR_HANDLING)
@Test
public void testUnionAllTablesColumnTypeMismatchStringLong()
{
Expand All @@ -3033,6 +3042,7 @@ public void testUnionAllTablesColumnTypeMismatchStringLong()
);
}

@DecoupledIgnore(mode = Modes.ERROR_HANDLING)
@Test
public void testUnionAllTablesWhenMappingIsRequired()
{
Expand All @@ -3049,6 +3059,7 @@ public void testUnionAllTablesWhenMappingIsRequired()
);
}

@DecoupledIgnore(mode = Modes.ERROR_HANDLING)
@Test
public void testUnionIsUnplannable()
{
Expand All @@ -3059,6 +3070,7 @@ public void testUnionIsUnplannable()
);
}

@DecoupledIgnore(mode = Modes.ERROR_HANDLING)
@Test
public void testUnionAllTablesWhenCastAndMappingIsRequired()
{
Expand All @@ -3074,6 +3086,7 @@ public void testUnionAllTablesWhenCastAndMappingIsRequired()
);
}

@DecoupledIgnore
@Test
public void testUnionAllSameTableTwice()
{
Expand Down Expand Up @@ -3117,6 +3130,7 @@ public void testUnionAllSameTableTwice()
);
}

@DecoupledIgnore(mode = Modes.NOT_ENOUGH_RULES)
@Test
public void testUnionAllSameTableTwiceWithSameMapping()
{
Expand Down Expand Up @@ -3160,6 +3174,7 @@ public void testUnionAllSameTableTwiceWithSameMapping()
);
}

@DecoupledIgnore(mode = Modes.ERROR_HANDLING)
@Test
public void testUnionAllSameTableTwiceWithDifferentMapping()
{
Expand All @@ -3173,7 +3188,7 @@ public void testUnionAllSameTableTwiceWithDifferentMapping()
"SQL requires union between two tables and column names queried for each table are different Left: [dim1, dim2, m1], Right: [dim2, dim1, m1]."
);
}

@DecoupledIgnore
@Test
public void testUnionAllSameTableThreeTimes()
{
Expand Down Expand Up @@ -3278,6 +3293,7 @@ public void testUnionAllThreeTablesColumnCountMismatch3()
}
}

@DecoupledIgnore
@Test
public void testUnionAllSameTableThreeTimesWithSameMapping()
{
Expand Down Expand Up @@ -5000,6 +5016,7 @@ public void testSimpleAggregations()
);
}

@DecoupledIgnore(mode = Modes.CANNOT_CONVERT)
@Test
public void testGroupByWithSortOnPostAggregationDefault()
{
Expand Down Expand Up @@ -5031,6 +5048,7 @@ public void testGroupByWithSortOnPostAggregationDefault()
);
}

@DecoupledIgnore(mode = Modes.CANNOT_CONVERT)
@Test
public void testGroupByWithSortOnPostAggregationNoTopNConfig()
{
Expand Down Expand Up @@ -5074,6 +5092,7 @@ public void testGroupByWithSortOnPostAggregationNoTopNConfig()
);
}

@DecoupledIgnore(mode = Modes.CANNOT_CONVERT)
@Test
public void testGroupByWithSortOnPostAggregationNoTopNContext()
{
Expand Down Expand Up @@ -5661,6 +5680,7 @@ public void testCountStarWithNotOfDegenerateFilter()
);
}

@DecoupledIgnore(mode = Modes.ERROR_HANDLING)
@Test
public void testUnplannableScanOrderByNonTime()
{
Expand Down Expand Up @@ -5715,6 +5735,7 @@ public void testCountStarWithBoundFilterSimplifyOr()
);
}

@DecoupledIgnore(mode = Modes.ERROR_HANDLING)
@Test
public void testUnplannableExactCountDistinctOnSketch()
{
Expand Down Expand Up @@ -6709,6 +6730,7 @@ public void testApproxCountDistinctBuiltin()
);
}

@DecoupledIgnore(mode = Modes.PLAN_MISMATCH)
@Test
public void testExactCountDistinctWithGroupingAndOtherAggregators()
{
Expand Down Expand Up @@ -6763,6 +6785,7 @@ public void testExactCountDistinctWithGroupingAndOtherAggregators()
);
}

@DecoupledIgnore(mode = Modes.NOT_ENOUGH_RULES)
@Test
public void testMultipleExactCountDistinctWithGroupingAndOtherAggregatorsUsingJoin()
{
Expand Down Expand Up @@ -7284,6 +7307,7 @@ public void testExactCountDistinctUsingSubquery()
);
}

@DecoupledIgnore(mode = Modes.NOT_ENOUGH_RULES)
@Test
public void testExactCountDistinctUsingSubqueryOnUnionAllTables()
{
Expand Down Expand Up @@ -7458,6 +7482,7 @@ public void testQueryWithMoreThanMaxNumericInFilter()
);
}

@DecoupledIgnore(mode = Modes.PLAN_MISMATCH)
@Test
public void testExactCountDistinctUsingSubqueryWithWherePushDown()
{
Expand Down Expand Up @@ -8188,6 +8213,7 @@ public void testGroupAndFilterOnTimeFloorWithTimeZone()
);
}

@DecoupledIgnore(mode = Modes.PLAN_MISMATCH)
@Test
public void testFilterOnCurrentTimestampWithIntervalArithmetic()
{
Expand Down Expand Up @@ -8235,6 +8261,7 @@ public void testFilterOnCurrentTimestampLosAngeles()
);
}

@DecoupledIgnore(mode = Modes.PLAN_MISMATCH)
@Test
public void testFilterOnCurrentTimestampOnView()
{
Expand Down Expand Up @@ -10426,6 +10453,7 @@ public void testGroupByTimeAndOtherDimension()
);
}

@DecoupledIgnore(mode = Modes.PLAN_MISMATCH)
@Test
public void testGroupByTimeFloorAndDimOnGroupByTimeFloorAndDim()
{
Expand Down Expand Up @@ -11592,7 +11620,7 @@ public void testSortProjectAfterNestedGroupBy()
);
}


@DecoupledIgnore(mode = Modes.CANNOT_CONVERT)
@Test
public void testPostAggWithTimeseries()
{
Expand Down Expand Up @@ -11636,6 +11664,7 @@ public void testPostAggWithTimeseries()
);
}

@DecoupledIgnore(mode = Modes.PLAN_MISMATCH)
@Test
public void testPostAggWithTopN()
{
Expand Down Expand Up @@ -11875,6 +11904,7 @@ public void testTextcat()
);
}

@DecoupledIgnore
@Test
public void testRequireTimeConditionPositive()
{
Expand Down Expand Up @@ -12078,6 +12108,7 @@ public void testRequireTimeConditionSubQueryNegative()
);
}

@DecoupledIgnore(mode = Modes.ERROR_HANDLING)
@Test
public void testRequireTimeConditionSemiJoinNegative()
{
Expand Down Expand Up @@ -14056,6 +14087,7 @@ public void testReturnEmptyRowWhenGroupByIsConvertedToTimeseriesWithMultipleCons
);
}

@DecoupledIgnore(mode = Modes.PLAN_MISMATCH)
@Test
public void testPlanWithInFilterLessThanInSubQueryThreshold()
{
Expand Down Expand Up @@ -14376,7 +14408,7 @@ public void testComplexDecodeAgg()
)
);
}

@DecoupledIgnore
@Test
public void testOrderByAlongWithInternalScanQuery()
{
Expand Down Expand Up @@ -14419,6 +14451,7 @@ public void testOrderByAlongWithInternalScanQuery()
);
}

@DecoupledIgnore(mode = Modes.NOT_ENOUGH_RULES)
@Test
public void testOrderByAlongWithInternalScanQueryNoDistinct()
{
Expand Down
Loading

0 comments on commit e76962f

Please sign in to comment.