@Override public void serialize(LogicalExpression value, JsonGenerator jgen, SerializerProvider provider) throws IOException { StringBuilder sb = new StringBuilder(); ExpressionStringBuilder esb = new ExpressionStringBuilder(); value.accept(esb, sb); jgen.writeString(sb.toString()); } }
@Override public String toString() { return ExpressionStringBuilder.toString(this); }
@Override public Void visitSchemaPath(SchemaPath path, StringBuilder sb) throws RuntimeException { PathSegment seg = path.getRootSegment(); if (seg.isArray()) { throw new IllegalStateException("Drill doesn't currently support top level arrays"); } sb.append('`'); sb.append(escapeBackTick(seg.getNameSegment().getPath())); sb.append('`'); while ( (seg = seg.getChild()) != null) { if (seg.isNamed()) { sb.append('.'); sb.append('`'); sb.append(escapeBackTick(seg.getNameSegment().getPath())); sb.append('`'); } else { sb.append('['); sb.append(seg.getArraySegment().getIndex()); sb.append(']'); } } return null; }
@Override public Void visitQuotedStringConstant(QuotedString e, StringBuilder sb) throws RuntimeException { sb.append("'"); sb.append(escapeSingleQuote(e.value)); sb.append("'"); return null; }
@Override public Void visitBooleanOperator(BooleanOperator op, StringBuilder sb) throws RuntimeException { return visitFunctionCall(op, sb); }
@Override public Void visitQuotedStringConstant(QuotedString e, StringBuilder sb) throws RuntimeException { sb.append("'"); sb.append(escapeSingleQuote(e.value)); sb.append("'"); return null; }
@Override public Void visitBooleanOperator(BooleanOperator op, StringBuilder sb) throws RuntimeException { return visitFunctionCall(op, sb); }
private String convertLExToStr(LogicalExpression lex) { StringBuilder sb = new StringBuilder(); ExpressionStringBuilder esb = new ExpressionStringBuilder(); lex.accept(esb, sb); return sb.toString(); }
public String toExpr() { return ExpressionStringBuilder.toString(this); }
@Override public Void visitSchemaPath(SchemaPath path, StringBuilder sb) throws RuntimeException { PathSegment seg = path.getRootSegment(); if (seg.isArray()) { throw new IllegalStateException("Drill doesn't currently support top level arrays"); } sb.append('`'); sb.append(escapeBackTick(seg.getNameSegment().getPath())); sb.append('`'); while ( (seg = seg.getChild()) != null) { if (seg.isNamed()) { sb.append('.'); sb.append('`'); sb.append(escapeBackTick(seg.getNameSegment().getPath())); sb.append('`'); } else { sb.append('['); sb.append(seg.getArraySegment().getIndex()); sb.append(']'); } } return null; }
private String serializeExpression(LogicalExpression expr){ ExpressionStringBuilder b = new ExpressionStringBuilder(); StringBuilder sb = new StringBuilder(); expr.accept(b, sb); return sb.toString(); }
@Override public String toString() { return ExpressionStringBuilder.toString(this); }
private String convertLExToStr(LogicalExpression lex) { StringBuilder sb = new StringBuilder(); ExpressionStringBuilder esb = new ExpressionStringBuilder(); lex.accept(esb, sb); return sb.toString(); }
public String toExpr() { return ExpressionStringBuilder.toString(this); }
@Override public void serialize(LogicalExpression value, JsonGenerator jgen, SerializerProvider provider) throws IOException { StringBuilder sb = new StringBuilder(); ExpressionStringBuilder esb = new ExpressionStringBuilder(); value.accept(esb, sb); jgen.writeString(sb.toString()); } }
protected String getFilterString() { return filter == null || filter.equals(ValueExpressions.BooleanExpression.TRUE) ? "" : ExpressionStringBuilder.toString(this.filter); }
/** * Get a HoldingContainer for the expression if it had been already evaluated */ private HoldingContainer getPrevious(LogicalExpression expression, MappingSet mappingSet) { HoldingContainer previous = previousExpressions.get(new ExpressionHolder(expression, mappingSet)); if (previous != null) { logger.debug("Found previously evaluated expression: {}", ExpressionStringBuilder.toString(expression)); } return previous; }
ExpressionStringBuilder.toString(filterExpr), rowGroupInfos.size(), qualifiedRGs.size());
return null; logger.debug("materializedFilter : {}", ExpressionStringBuilder.toString(materializedFilter));
logger.debug("Constant expression not folded due to return type {}, complete expression: {}", materializedExpr.getMajorType(), ExpressionStringBuilder.toString(materializedExpr)); reducedValues.add(newCall); continue;