Examples of QualifiedNameReference


Examples of com.facebook.presto.sql.tree.QualifiedNameReference

            Expression filterExpression = node.getPredicate();

            List<Expression> projectionExpressions = new ArrayList<>();
            for (int i = 0; i < node.getOutputSymbols().size(); i++) {
                Symbol symbol = node.getOutputSymbols().get(i);
                projectionExpressions.add(new QualifiedNameReference(symbol.toQualifiedName()));
            }

            List<Symbol> outputSymbols = node.getOutputSymbols();

            return visitScanFilterAndProject(context, sourceNode, filterExpression, projectionExpressions, outputSymbols);
View Full Code Here

Examples of com.facebook.presto.sql.tree.QualifiedNameReference

        public Void visitJoin(JoinNode node, Void context)
        {
            List<Expression> joinExpressions = new ArrayList<>();
            for (JoinNode.EquiJoinClause clause : node.getCriteria()) {
                joinExpressions.add(new ComparisonExpression(ComparisonExpression.Type.EQUAL,
                        new QualifiedNameReference(clause.getLeft().toQualifiedName()),
                        new QualifiedNameReference(clause.getRight().toQualifiedName())));
            }

            String criteria = Joiner.on(" AND ").join(joinExpressions);
            printNode(node, node.getType().getJoinLabel(), criteria, NODE_COLORS.get(NodeType.JOIN));
View Full Code Here

Examples of com.facebook.presto.sql.tree.QualifiedNameReference

        ImmutableMap.Builder<Symbol, Expression> projections = ImmutableMap.builder();

        // add an identity projection for underlying plan
        for (Symbol symbol : subPlan.getRoot().getOutputSymbols()) {
            Expression expression = new QualifiedNameReference(symbol.toQualifiedName());
            projections.put(symbol, expression);
        }

        ImmutableMap.Builder<Symbol, Expression> newTranslations = ImmutableMap.builder();
        for (Expression expression : expressions) {
View Full Code Here

Examples of io.crate.sql.tree.QualifiedNameReference

                .addPrimaryKey("name").build();

        PartitionName partitionName = PartitionPropertiesAnalyzer.toPartitionName(
                tableInfo,
                Arrays.asList(new Assignment(
                        new QualifiedNameReference(new QualifiedName("name")),
                        new StringLiteral("foo"))),
                new Object[0]);
        assertThat(partitionName.stringValue(), is(".partitioned.users.0426crrf"));
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference

        } else {
          throwit(snr.binding);
        }
        return output;
      } else if (e instanceof QualifiedNameReference) {
        QualifiedNameReference qnr = (QualifiedNameReference) e;
        if (qnr.binding instanceof FieldBinding) {
          FieldBinding fb = (FieldBinding) qnr.binding;
          ReferenceBinding rb = fb.declaringClass;
          if (fb.isStatic()) {
            output.append(CharOperation.concatWith(rb.compoundName, '.'));
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference

          resizeContents(5);
        }
        contents[contentsOffset++] = (byte) 'e';
        FieldBinding fieldBinding = null;
        if (defaultValue instanceof QualifiedNameReference) {
          QualifiedNameReference nameReference = (QualifiedNameReference) defaultValue;
          fieldBinding = (FieldBinding) nameReference.binding;
        } else if (defaultValue instanceof SingleNameReference) {
          SingleNameReference nameReference = (SingleNameReference) defaultValue;
          fieldBinding = (FieldBinding) nameReference.binding;
        } else {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference

  private AnnotationValue generateElementValueForNonConstantExpression(Expression defaultValue, TypeBinding defaultValueBinding) {
    if (defaultValueBinding != null) {
      if (defaultValueBinding.isEnum()) {
        FieldBinding fieldBinding = null;
        if (defaultValue instanceof QualifiedNameReference) {
          QualifiedNameReference nameReference = (QualifiedNameReference) defaultValue;
          fieldBinding = (FieldBinding) nameReference.binding;
        } else if (defaultValue instanceof SingleNameReference) {
          SingleNameReference nameReference = (SingleNameReference) defaultValue;
          fieldBinding = (FieldBinding) nameReference.binding;
        } else {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference

      TypeBinding defaultValueBinding) {
    if (defaultValueBinding != null) {
      if (defaultValueBinding.isEnum()) {
        FieldBinding fieldBinding = null;
        if (defaultValue instanceof QualifiedNameReference) {
          QualifiedNameReference nameReference = (QualifiedNameReference) defaultValue;
          fieldBinding = (FieldBinding) nameReference.binding;
        } else if (defaultValue instanceof SingleNameReference) {
          SingleNameReference nameReference = (SingleNameReference) defaultValue;
          fieldBinding = (FieldBinding) nameReference.binding;
        } else {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference

  synchronized ITypeBinding resolveTypeBindingForName(Name name) {
    org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode node = (org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode) this.newAstToOldAst.get(name);
    int index = name.index;
    if (node instanceof QualifiedNameReference) {
      QualifiedNameReference qualifiedNameReference = (QualifiedNameReference) node;
      final char[][] tokens = qualifiedNameReference.tokens;
      if (tokens.length == index) {
        return this.getTypeBinding(qualifiedNameReference.resolvedType);
      }
      int indexOfFirstFieldBinding = qualifiedNameReference.indexOfFirstFieldBinding; // one-based
      if (index < indexOfFirstFieldBinding) {
        // an extra lookup is required
        BlockScope internalScope = (BlockScope) this.astNodesToBlockScope.get(name);
        Binding binding = null;
        try {
          if (internalScope == null) {
            if (this.scope == null) return null;
            binding = this.scope.getTypeOrPackage(CharOperation.subarray(tokens, 0, index));
          } else {
            binding = internalScope.getTypeOrPackage(CharOperation.subarray(tokens, 0, index));
          }
        } catch (AbortCompilation e) {
          // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=53357
          // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=63550
          // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=64299
        }
        if (binding instanceof org.aspectj.org.eclipse.jdt.internal.compiler.lookup.PackageBinding) {
          return null;
        } else if (binding instanceof org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding) {
          // it is a type
          return this.getTypeBinding((org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding)binding);
        }
      } else if (index == indexOfFirstFieldBinding) {
        if (qualifiedNameReference.isTypeReference()) {
          return this.getTypeBinding(qualifiedNameReference.resolvedType);
        } else {
          // in this case we want to get the next field declaring's class
          if (qualifiedNameReference.otherBindings == null) {
            return null;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference

   */
  synchronized IBinding resolveName(Name name) {
    org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode node = (org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode) this.newAstToOldAst.get(name);
    int index = name.index;
    if (node instanceof QualifiedNameReference) {
      QualifiedNameReference qualifiedNameReference = (QualifiedNameReference) node;
      final char[][] tokens = qualifiedNameReference.tokens;
      int indexOfFirstFieldBinding = qualifiedNameReference.indexOfFirstFieldBinding; // one-based
      if (index < indexOfFirstFieldBinding) {
        // an extra lookup is required
        BlockScope internalScope = (BlockScope) this.astNodesToBlockScope.get(name);
        Binding binding = null;
        try {
          if (internalScope == null) {
            if (this.scope == null) return null;
            binding = this.scope.getTypeOrPackage(CharOperation.subarray(tokens, 0, index));
          } else {
            binding = internalScope.getTypeOrPackage(CharOperation.subarray(tokens, 0, index));
          }
        } catch (AbortCompilation e) {
          // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=53357
          // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=63550
          // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=64299
        }
        if (binding instanceof org.aspectj.org.eclipse.jdt.internal.compiler.lookup.PackageBinding) {
          return this.getPackageBinding((org.aspectj.org.eclipse.jdt.internal.compiler.lookup.PackageBinding)binding);
        } else if (binding instanceof org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding) {
          // it is a type
          return this.getTypeBinding((org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding)binding);
        }
      } else if (index == indexOfFirstFieldBinding) {
        if (qualifiedNameReference.isTypeReference()) {
          return this.getTypeBinding(qualifiedNameReference.resolvedType);
        } else {
          Binding binding = qualifiedNameReference.binding;
          if (binding != null) {
            if (binding.isValidBinding()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.