Package org.apache.drill.exec.planner.types

Examples of org.apache.drill.exec.planner.types.DrillFixedRelDataTypeImpl


            if (field.equals("*"))
              return DirectPlan.createDirectPlan(context, false,
                  "View's query field list has a '*', which is invalid when View's field list is specified.");
          }

          queryRowType = new DrillFixedRelDataTypeImpl(planner.getTypeFactory(), viewFieldNames);
        }

        View view = new View(createView.getName(), viewSql, queryRowType, workspaceSchemaPath);

        boolean replaced;
View Full Code Here


      // if the CTAS statement has table fields lists (ex. below), add a project rel to rename the query fields.
      // Ex. CREATE TABLE tblname(col1, medianOfCol2, avgOfCol3) AS
      //        SELECT col1, median(col2), avg(col3) FROM sourcetbl GROUP BY col1 ;
      if (tblFiledNames.size() > 0) {
        // create rowtype to which the select rel needs to be casted.
        RelDataType rowType = new DrillFixedRelDataTypeImpl(planner.getTypeFactory(), tblFiledNames);

        relQuery = RelOptUtil.createCastRel(relQuery, rowType, true);
      }

      SchemaPlus schema = findSchema(context.getRootSchema(), context.getNewDefaultSchema(),
View Full Code Here

              return DirectPlan.createDirectPlan(context, false,
                  "View's query field list has a '*', which is invalid when View's field list is specified.");
            }
          }

          queryRowType = new DrillFixedRelDataTypeImpl(planner.getTypeFactory(), viewFieldNames);
        }

        View view = new View(createView.getName(), viewSql, queryRowType, workspaceSchemaPath);

        boolean replaced;
View Full Code Here

      // if the CTAS statement has table fields lists (ex. below), add a project rel to rename the query fields.
      // Ex. CREATE TABLE tblname(col1, medianOfCol2, avgOfCol3) AS
      //        SELECT col1, median(col2), avg(col3) FROM sourcetbl GROUP BY col1 ;
      if (tblFiledNames.size() > 0) {
        // create rowtype to which the select rel needs to be casted.
        RelDataType rowType = new DrillFixedRelDataTypeImpl(planner.getTypeFactory(), tblFiledNames);

        relQuery = RelOptUtil.createCastRel(relQuery, rowType, true);
      }

      SchemaPlus schema = findSchema(context.getRootSchema(), context.getNewDefaultSchema(),
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.planner.types.DrillFixedRelDataTypeImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.