Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangfu0 authored Aug 19, 2023
1 parent 9583676 commit 23fb7f3
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ public void testTimeExtractFunction(boolean useMultiStageQueryEngine)
+ "WEEK_OF_YEAR(ts1), WEEK_OF_YEAR(ts2),\n"
+ "DAY_OF_YEAR(ts1), DAY_OF_YEAR(ts2),\n"
+ "DAY_OF_MONTH(ts1), DAY_OF_MONTH(ts2),\n"
+ "DAY_OF_WEEK(ts1), DAY_OF_WEEK(ts2)\n"
+ "DAY_OF_WEEK(ts1), DAY_OF_WEEK(ts2),\n"
+ "DOY(ts1), DOY(ts2),\n"
+ "DOW(ts1), DOW(ts2),\n"
+ "QUARTER(ts1), QUARTER(ts2)\n"
+ "FROM %s\n"
+ "LIMIT %d\n", getTableName(), getCountStarResult());
JsonNode jsonNode = postQuery(query);
Expand All @@ -165,6 +168,12 @@ public void testTimeExtractFunction(boolean useMultiStageQueryEngine)
jsonNode.get("resultTable").get("rows").get(i).get(19).asInt());
assertEquals(jsonNode.get("resultTable").get("rows").get(i).get(20).asInt(),
jsonNode.get("resultTable").get("rows").get(i).get(21).asInt());
assertEquals(jsonNode.get("resultTable").get("rows").get(i).get(22).asInt(),
jsonNode.get("resultTable").get("rows").get(i).get(23).asInt());
assertEquals(jsonNode.get("resultTable").get("rows").get(i).get(24).asInt(),
jsonNode.get("resultTable").get("rows").get(i).get(25).asInt());
assertEquals(jsonNode.get("resultTable").get("rows").get(i).get(26).asInt(),
jsonNode.get("resultTable").get("rows").get(i).get(27).asInt());
}
}

Expand Down

0 comments on commit 23fb7f3

Please sign in to comment.