Skip to content

Commit

Permalink
[native] Backing out commit 6eba1f7
Browse files Browse the repository at this point in the history
To fix widespread failures of "linux-presto-e2e-tests" and
"linux-spark-e2e-tests" tests due to hi memory use.
  • Loading branch information
spershin committed Feb 14, 2024
1 parent 468de33 commit 376144f
Showing 1 changed file with 2 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public abstract class AbstractTestNativeWindowQueries
extends AbstractTestQueryFramework
{
protected enum FunctionType {
RANK, VALUE, AGGREGATE,
RANK, VALUE,
}

@Override
Expand Down Expand Up @@ -74,7 +74,7 @@ protected List<String> getQueries(String function, FunctionType functionType)
ImmutableList.Builder<String> queries = ImmutableList.builder();
List<String> overClauses = new ArrayList<>(OVER_CLAUSES_WITH_ORDER_BY);
List<String> frameClauses = FRAME_CLAUSES;
if (functionType != FunctionType.RANK) {
if (functionType == FunctionType.VALUE) {
overClauses.addAll(OVER_CLAUSES_WITHOUT_ORDER_BY);
}
List<String> windowClauseList = new ArrayList<>();
Expand Down Expand Up @@ -115,12 +115,6 @@ protected void testWindowFunction(String functionName, FunctionType functionType
}
}

protected void testWindowAggregate(String functionName)
{
testWindowFunction(functionName + "(orderkey)", FunctionType.AGGREGATE);
testWindowFunction(functionName + "(totalprice)", FunctionType.AGGREGATE);
}

@Test
public void testCumeDist()
{
Expand Down Expand Up @@ -203,34 +197,4 @@ public void testOverlappingPartitionAndSortingKeys()
assertQuery("SELECT min(orderkey) OVER (PARTITION BY orderdate ORDER BY orderdate, totalprice) FROM orders");
assertQuery("SELECT * FROM (SELECT row_number() over(partition by orderstatus order by orderkey, orderstatus) rn, * from orders) WHERE rn = 1");
}

@Test
public void testSum()
{
testWindowAggregate("sum");
}

@Test
public void testAvg()
{
testWindowAggregate("avg");
}

@Test
public void testCount()
{
testWindowAggregate("count");
}

@Test
public void testMin()
{
testWindowAggregate("min");
}

@Test
public void testMax()
{
testWindowAggregate("max");
}
}

0 comments on commit 376144f

Please sign in to comment.