Skip to content

Commit

Permalink
Add UT
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiheLiu committed Jul 16, 2024
1 parent ee8ac9a commit 7a00dc7
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.starrocks.common.profile.Tracers;
import com.starrocks.qe.SessionVariable;
import com.starrocks.qe.VariableMgr;
import com.starrocks.sql.common.StarRocksPlannerException;
import com.starrocks.sql.optimizer.OptExpression;
import com.starrocks.sql.optimizer.OptimizerContext;
import com.starrocks.sql.optimizer.base.CTEProperty;
Expand Down Expand Up @@ -177,7 +178,6 @@ public void testTPCDS23_1() throws Exception {
" | other join predicates: CAST(118: sum AS DOUBLE) > CAST(0.5 * 190: max AS DOUBLE)"));
}


@Test
public void testGroupByLimit() throws Exception {
// check can generate 1 phase with limit 1
Expand Down Expand Up @@ -727,7 +727,6 @@ public void testJoinWithArray() throws Exception {
" | TABLE: tbl_mock_024"));
}


@Test
public void testTwoStageAgg() throws Exception {
Pair<QueryDumpInfo, String> replayPair =
Expand Down Expand Up @@ -957,4 +956,10 @@ public void testQueryCacheSetOperator() throws Exception {
connectContext.getSessionVariable().replayFromJson(savedSv);
}
}

@Test
public void testQueryTimeout() {
Assert.assertThrows(StarRocksPlannerException.class,
() -> getPlanFragment(getDumpInfoFromFile("query_dump/query_timeout"), null, TExplainLevel.NORMAL));
}
}
Loading

0 comments on commit 7a00dc7

Please sign in to comment.