private void createOutputStream() {
   if (!context.isPipeStreamNotCreated()) {
     return;
   }
   Schema outputSchema = context.getSelectContext().getSelectClauseContext().getOutputSchema();
   outputSchema.setId(context.getOutputStreamName());
   outputSchema.setName(context.getOutputStreamName());
   outputSchema.setStreamName(context.getOutputStreamName());
   context.setOutputSchema(outputSchema);
 }
  private List<Schema> initSchema() throws SemanticAnalyzerException {
    List<Schema> schemas = new ArrayList<Schema>();
    Schema s1 = new Schema("S1");

    s1.addCol(new Column("id", String.class));
    s1.addCol(new Column("name", String.class));

    schemas.add(s1);
    return schemas;
  }
  private List<Schema> createSchemas() {
    List<Column> cols1 = new ArrayList<Column>();
    cols1.add(new Column("msisdn", String.class));
    cols1.add(new Column("host", String.class));
    cols1.add(new Column("CaseID", String.class));

    List<Column> cols2 = new ArrayList<Column>();
    cols2.add(new Column("msisdn", String.class));
    cols2.add(new Column("host", String.class));
    cols2.add(new Column("CaseID", String.class));

    Schema schema1 = new Schema("inputSchema");
    schema1.setCols(cols1);

    Schema schema2 = new Schema("outputSchema");
    schema2.setCols(cols2);

    List<Schema> results = new ArrayList<Schema>();
    results.add(schema1);
    results.add(schema2);

    return results;
  }
예제 #4
0
  private static List<Schema> createSchemas() {
    List<Column> cols1 = new ArrayList<Column>();
    cols1.add(new Column("a", Integer.class));
    cols1.add(new Column("b", Integer.class));
    cols1.add(new Column("c", String.class));

    List<Column> cols2 = new ArrayList<Column>();
    cols2.add(new Column("a", Integer.class));
    cols2.add(new Column("b", Integer.class));
    cols2.add(new Column("c", String.class));

    Schema schema1 = new Schema("testSchema1");
    schema1.setCols(cols1);

    Schema schema2 = new Schema("testSchema2");
    schema2.setCols(cols2);

    List<Schema> results = new ArrayList<Schema>();
    results.add(schema1);
    results.add(schema2);

    return results;
  }