apache/tajo — pull request #16 by babokim (2014-05-22 08:48:51+00:00)
Title: TAJO-762: Implements current date/time function

I rebased after committing TAJO-825.
While running TestCase I found the next message, but all tests is succeeded.
This message is generated in the TestBuiltinFunctions.testRandom() because every random() eval makes different value.
So I fixed TajoClient.executeQueryAndGetResult() method, some test codes and removed TestBuiltinFunctions.testRandom() in this patch. I'll create new issue for TestBuiltinFunctions.testRandom() bug.

```
com.google.protobuf.ServiceException: org.apache.tajo.engine.planner.PlanningException: Duplicate alias: 1
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule$TargetListManager.add(ProjectionPushDownRule.java:168)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule$TargetListManager.add(ProjectionPushDownRule.java:230)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule$Context.addExpr(ProjectionPushDownRule.java:363)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitScan(ProjectionPushDownRule.java:874)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitScan(ProjectionPushDownRule.java:42)
at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:99)
at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitGroupBy(BasicLogicalPlanVisitor.java:185)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitGroupBy(ProjectionPushDownRule.java:578)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitGroupBy(ProjectionPushDownRule.java:42)
at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:75)
at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitProjection(BasicLogicalPlanVisitor.java:149)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:406)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:42)
at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:63)
at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitRoot(BasicLogicalPlanVisitor.java:139)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitRoot(ProjectionPushDownRule.java:389)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitRoot(ProjectionPushDownRule.java:42)
at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:58)
at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.rewrite(ProjectionPushDownRule.java:72)
at org.apache.tajo.engine.planner.rewrite.BasicQueryRewriteEngine.rewrite(BasicQueryRewriteEngine.java:63)
at org.apache.tajo.engine.planner.LogicalOptimizer.optimize(LogicalOptimizer.java:74)
at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:481)
at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:147)
```