Package net.hydromatic.optiq

Examples of net.hydromatic.optiq.SchemaPlus


      return defaultSchema;
    }
  }

  public SchemaPlus getRootSchema(){
    SchemaPlus rootSchema = SimpleOptiqSchema.createRootSchema(false);
    drillbitContext.getSchemaFactory().registerSchemas(session, rootSchema);
    return rootSchema;
  }
View Full Code Here


      //          -- "hivedb1"
      //    -- "hive.default"
      //    -- "hive.hivedb1"
      List<SchemaPlus> secondLevelSchemas = Lists.newArrayList();
      for (String firstLevelSchemaName : parent.getSubSchemaNames()) {
        SchemaPlus firstLevelSchema = parent.getSubSchema(firstLevelSchemaName);
        for (String secondLevelSchemaName : firstLevelSchema.getSubSchemaNames()) {
          secondLevelSchemas.add(firstLevelSchema.getSubSchema(secondLevelSchemaName));
        }
      }

      for (SchemaPlus schema : secondLevelSchemas) {
        AbstractSchema drillSchema;
View Full Code Here

   * @param fullPath The desired path to set to.
   * @param schema The root schema to find this path within.
   * @return true if the path was set successfully.  false if this path was unavailable.
   */
  public boolean setDefaultSchemaPath(String fullPath, SchemaPlus schema){
    SchemaPlus newDefault = findSchema(schema, fullPath);
    if(newDefault == null) return false;
    setProp(SCHEMA, fullPath);
    return true;
  }
View Full Code Here

    properties.put(key, value);
  }

  private SchemaPlus findSchema(SchemaPlus rootSchema, String schemaPath) {
    String[] paths = schemaPath.split("\\.");
    SchemaPlus schema = rootSchema;
    for(String p : paths){
      schema = schema.getSubSchema(p);
      if(schema == null) break;
    }
    return schema;
  }
View Full Code Here

TOP

Related Classes of net.hydromatic.optiq.SchemaPlus

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.