Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gianm committed May 1, 2024
1 parent 2c3925a commit 6371f66
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,6 @@ public SpecificSegmentsQuerySegmentWalker createQuerySegmentWalker(
@Test
public void testApproxCountDistinctHllSketch()
{
// Can't vectorize due to SUBSTRING expression.
cannotVectorize();

final String sql = "SELECT\n"
+ " SUM(cnt),\n"
+ " APPROX_COUNT_DISTINCT_DS_HLL(dim2),\n" // uppercase
Expand Down Expand Up @@ -1100,7 +1097,6 @@ public void testHllEstimateAsVirtualColumnOnNonHllCol()
@Test
public void testHllEstimateAsVirtualColumnWithGroupByOrderBy()
{
cannotVectorize();
testQuery(
"SELECT"
+ " HLL_SKETCH_ESTIMATE(hllsketch_dim1), count(*)"
Expand Down Expand Up @@ -1198,7 +1194,6 @@ public void testHllWithOrderedWindowing()
@Test
public void testResultCacheWithWindowing()
{
cannotVectorize();
for (int i = 0; i < 2; i++) {
testBuilder()
.queryContext(ImmutableMap.of(PlannerContext.CTX_ENABLE_WINDOW_FNS, true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ public SpecificSegmentsQuerySegmentWalker createQuerySegmentWalker(
@Test
public void testApproxCountDistinctThetaSketch()
{
// Cannot vectorize due to SUBSTRING.
cannotVectorize();

final String sql = "SELECT\n"
+ " SUM(cnt),\n"
+ " APPROX_COUNT_DISTINCT_DS_THETA(dim2),\n"
Expand Down Expand Up @@ -1121,7 +1118,6 @@ public void testThetaEstimateAsVirtualColumnOnNonThetaCol()
@Test
public void testThetaEstimateAsVirtualColumnWithGroupByOrderBy()
{
cannotVectorize();
testQuery(
"SELECT"
+ " THETA_SKETCH_ESTIMATE(thetasketch_dim1), count(*)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,9 @@ public void testFilterInAndIsNotNull()
@Test
public void testFilterInOrIsNullInjective()
{
cannotVectorize();
if (NullHandling.sqlCompatible()) {
cannotVectorize();
}

testQuery(
buildFilterTestSql(
Expand Down Expand Up @@ -747,7 +749,10 @@ public void testFilterMvContainsNull()
@Test
public void testFilterMvContainsNullInjective()
{
cannotVectorize();
if (NullHandling.sqlCompatible()) {
// cannotVectorize doesn't trip in default-value mode, due to buildFilterTestExpectedQueryAlwaysFalse.
cannotVectorize();
}

testQuery(
buildFilterTestSql("MV_CONTAINS(LOOKUP(dim1, 'lookyloo121'), NULL)"),
Expand Down Expand Up @@ -967,7 +972,10 @@ public void testFilterIsNull()
@Test
public void testFilterIsNullInjective()
{
cannotVectorize();
if (NullHandling.sqlCompatible()) {
// cannotVectorize doesn't trip in default-value mode, due to buildFilterTestExpectedQueryAlwaysFalse.
cannotVectorize();
}

testQuery(
buildFilterTestSql("LOOKUP(dim1, 'lookyloo121') IS NULL"),
Expand Down Expand Up @@ -1236,7 +1244,10 @@ public void testFilterCoalesceSameLiteral()
@Test
public void testFilterCoalesceSameLiteralInjective()
{
cannotVectorize();
if (NullHandling.sqlCompatible()) {
// cannotVectorize doesn't trip in default-value mode, due to buildFilterTestExpectedQueryAlwaysFalse.
cannotVectorize();
}

testQuery(
buildFilterTestSql("COALESCE(LOOKUP(dim1, 'lookyloo121'), 'x6') = 'x6'"),
Expand Down

0 comments on commit 6371f66

Please sign in to comment.