Package org.apache.drill.common.expression.PathSegment

Examples of org.apache.drill.common.expression.PathSegment.NameSegment


  }

  public static SchemaPath getCompoundPath(String... strings){
    List<String> paths = Arrays.asList(strings);
    Collections.reverse(paths);
    NameSegment s = null;
    for(String p : paths){
      s = new NameSegment(p, s);
    }
    return new SchemaPath(s);
  }
View Full Code Here


   * @param simpleName
   */
  @Deprecated
  public SchemaPath(String simpleName, ExpressionPosition pos){
    super(pos);
    this.rootSegment = new NameSegment(simpleName);
    if(simpleName.contains(".")) throw new IllegalStateException("This is deprecated and only supports simpe paths.");
  }
View Full Code Here

  private static PathSegment getPathSegment(NamePart n){
    PathSegment child = n.hasChild() ? getPathSegment(n.getChild()) : null;
    if(n.getType() == Type.ARRAY){
      return new ArraySegment(child);
    }else{
      return new NameSegment(n.getName(), child);
    }
  }
View Full Code Here

  public <T, V, E extends Exception> T accept(ExprVisitor<T, V, E> visitor, V value) throws E {
    return visitor.visitSchemaPath(this, value);
  }

  public SchemaPath getChild(String childPath){
    NameSegment newRoot = rootSegment.cloneWithNewChild(new NameSegment(childPath));
    return new SchemaPath(newRoot);
  }
View Full Code Here

    NameSegment newRoot = rootSegment.cloneWithNewChild(new NameSegment(childPath));
    return new SchemaPath(newRoot);
  }

  public SchemaPath getUnindexedArrayChild(){
    NameSegment newRoot = rootSegment.cloneWithNewChild(new ArraySegment(null));
    return new SchemaPath(newRoot);
  }
View Full Code Here

    NameSegment newRoot = rootSegment.cloneWithNewChild(new ArraySegment(null));
    return new SchemaPath(newRoot);
  }

  public SchemaPath getChild(int index){
    NameSegment newRoot = rootSegment.cloneWithNewChild(new ArraySegment(index));
    return new SchemaPath(newRoot);
  }
View Full Code Here

        if (column.getRootSegment().getPath().equalsIgnoreCase(ROW_KEY)) {
          this.columns.add(ROW_KEY_PATH);
          continue;
        }
        rowKeyOnly = false;
        NameSegment root = column.getRootSegment();
        byte[] family = root.getPath().getBytes();
        this.columns.add(SchemaPath.getSimplePath(root.getPath()));
        PathSegment child = root.getChild();
        if (child != null && child.isNamed()) {
          byte[] qualifier = child.getNameSegment().getPath().getBytes();
          hbaseScan.addColumn(family, qualifier);
        } else {
          hbaseScan.addFamily(family);
View Full Code Here

TOP

Related Classes of org.apache.drill.common.expression.PathSegment.NameSegment

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.