Search in sources :

Example 1 with PigletCompiler

use of org.apache.hyracks.algebricks.examples.piglet.compiler.PigletCompiler in project asterixdb by apache.

the class PigletTestCase method testPiglet.

@Test
public void testPiglet() {
    try {
        FileReader in = new FileReader(file);
        try {
            PigletCompiler c = new PigletCompiler();
            List<ASTNode> ast = c.parse(in);
            JobSpecification jobSpec = c.compile(ast);
            System.err.println(jobSpec.toJSON());
        } finally {
            in.close();
        }
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
Also used : PigletCompiler(org.apache.hyracks.algebricks.examples.piglet.compiler.PigletCompiler) ASTNode(org.apache.hyracks.algebricks.examples.piglet.ast.ASTNode) FileReader(java.io.FileReader) JobSpecification(org.apache.hyracks.api.job.JobSpecification) Test(org.junit.Test)

Aggregations

FileReader (java.io.FileReader)1 ASTNode (org.apache.hyracks.algebricks.examples.piglet.ast.ASTNode)1 PigletCompiler (org.apache.hyracks.algebricks.examples.piglet.compiler.PigletCompiler)1 JobSpecification (org.apache.hyracks.api.job.JobSpecification)1 Test (org.junit.Test)1