Examples of Cast


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

            if (!column.isPartitionKey()) {
                continue;
            }
            Expression key = equal(nameReference("partition_key"), new StringLiteral(column.getName()));
            Expression value = caseWhen(key, nameReference("partition_value"));
            value = new Cast(value, column.getType().getName());
            Expression function = functionCall("max", value);
            selectList.add(new SingleColumn(function, column.getName()));
            wrappedList.add(unaliasedName(column.getName()));
        }
View Full Code Here

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

                Expression rewrittenExpression = treeRewriter.defaultRewrite(node, context);

                // cast expression if coercion is registered
                Type coercion = analysis.getCoercion(node);
                if (coercion != null) {
                    rewrittenExpression = new Cast(rewrittenExpression, coercion.getName());
                }

                return rewrittenExpression;
            }
        }, parsedExpression);
View Full Code Here

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

                Expression rewrittenExpression = treeRewriter.defaultRewrite(node, context);

                // cast expression if coercion is registered
                Type coercion = analysis.getCoercion(node);
                if (coercion != null) {
                    rewrittenExpression = new Cast(rewrittenExpression, coercion.getName());
                }

                return rewrittenExpression;
            }
        }, parsedExpression);
View Full Code Here

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

                Expression rewrittenExpression = treeRewriter.defaultRewrite(node, context);

                // cast expression if coercion is registered
                Type coercion = analysis.getCoercion(node);
                if (coercion != null) {
                    rewrittenExpression = new Cast(rewrittenExpression, coercion.getName());
                }

                return rewrittenExpression;
            }
        }, parsedExpression);
View Full Code Here

Examples of com.headius.invokebinder.transform.Cast

     *
     * @param type the target MethodType
     * @return a new Binder
     */
    public Binder cast(MethodType type) {
        return new Binder(this, new Cast(type()), type);
    }
View Full Code Here

Examples of com.headius.invokebinder.transform.Cast

     * @param returnType the target return type
     * @param argTypes   the target argument types
     * @return a new Binder
     */
    public Binder cast(Class returnType, Class... argTypes) {
        return new Binder(this, new Cast(type()), MethodType.methodType(returnType, argTypes));
    }
View Full Code Here

Examples of kiss.lang.expression.Cast

  }
 
  @SuppressWarnings("unused")
  @Test public void testCast() {
    try {
      Cast cast=Cast.create(String.class, Constant.create(10));
      fail("Cast should throw exception if cast is not possible");
    } catch (KissException ke) {
      // OK!
    }
   
View Full Code Here

Examples of lombok.ast.Cast

      expr.astParensPositions().add(getPosition(node));
      set(node, expr);
    }
   
    @Override public void visitTypeCast(JCTypeCast node) {
      Cast cast = new Cast();
      cast.rawOperand(toTree(node.getExpression()));
      cast.rawTypeReference(toTree(node.getType(), FlagKey.TYPE_REFERENCE));
      set(node, cast);
    }
View Full Code Here

Examples of org.candle.decompiler.intermediate.expression.Cast

    //now see what type it is.
    LOG.debug("To Type: "+type);
   
    Resolved resolve = new Resolved(context.getCurrentInstruction(), type, type.toString());
   
    Cast cast = new Cast(context.getCurrentInstruction(), resolve, right);
    context.getExpressions().push(cast);
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.debug.eval.ast.instructions.Cast

      int dimension = typeBinding.getDimensions();
      if (typeBinding.isArray()) {
        typeBinding = typeBinding.getElementType();
      }
      baseTypeSignature = getTypeName(typeBinding);
      push(new Cast(typeId, baseTypeSignature, dimension, fCounter));
      node.getExpression().accept(this);
    }

    return false;
  }
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.