Package org.apache.drill.common
Class PlanStringBuilder
java.lang.Object
org.apache.drill.common.PlanStringBuilder
Builds a string in Drill's "plan string" format: that shown in the
text version of
EXPLAIN PLAN FOR
output. Example:
Mumble[foo=fred, bar=barney]
Similar to the Guava Objects.ToStringHelper
class but for
the Drill "plan-string" format. Use this class for any object that
may be displayed in an query plan.
Example usage:
public String toString() {
return PlanStringBuilder(this)
.field("foo", foo)
.field("bar", bar)
.toString();
}
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionescapedField
(String key, char value) Displays a character in Java-quoted format:delimiter="\n"
.escapedField
(String key, String value) Displays a string in Java-quoted format:delimiter="\t"
.Displays a numeric field:size=10
.Displays the field as an unquotedtoString()
value.Displays the field as a quoted string:foo="bar"
.maskedField
(String key, String value) toString()
unquotedField
(String key, String value) Displays the field as an unquoted string.
-
Constructor Details
-
PlanStringBuilder
-
PlanStringBuilder
-
-
Method Details
-
field
Displays the field as a quoted string:foo="bar"
. -
unquotedField
Displays the field as an unquoted string. Use this for things like names:mode=OPTIONAL
. -
field
Displays the field as an unquotedtoString()
value. Omits the field if the value is null. -
field
Displays a numeric field:size=10
. -
escapedField
Displays a character in Java-quoted format:delimiter="\n"
. -
escapedField
Displays a string in Java-quoted format:delimiter="\t"
. -
maskedField
-
toString
-