Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/13#discussion_r14168071
  
    --- Diff: 
tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
 ---
    @@ -1021,4 +1046,53 @@ public final void testGroupByEnforcer() throws 
IOException, PlanningException {
     
         assertTrue(exec instanceof SortAggregateExec);
       }
    +
    +  String [] WINDOW = {
    +    "select deptName, class, sum(score) OVER() from score",
    +    "select deptName, score, sum(score) OVER(PARTITION BY deptName) from 
score",
    +    "select deptName, class, score, sum(score) OVER(PARTITION BY deptName, 
class) from score",
    +    "select deptName, class, sum(score), max(score), min(score) from score 
group by deptName, class",
    +  };
    +
    +  @Test
    +  public final void testWindowAggPlan() throws IOException, 
PlanningException {
    +    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", 
score.getMeta(), score.getPath(),
    +        Integer.MAX_VALUE);
    +    Path workDir = 
CommonTestingUtil.getTestDir("target/test-data/testSortGroupByPlan");
    +    TaskAttemptContext ctx = new TaskAttemptContext(conf, new 
QueryContext(),
    +        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
    +        new FileFragment[]{frags[0]}, workDir);
    +    ctx.setEnforcer(new Enforcer());
    +    Expr context = analyzer.parse(WINDOW[1]);
    +    LogicalPlan plan = planner.createPlan(session, context);
    +    System.out.println(plan);
    --- End diff --
    
    removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to