@Test public void testProjectionToString1() throws Exception { Projection projection = new Projection("UPPER(review_id) AS Camel", null, null, null); String str = projection.toString(); Assert.assertEquals("UPPER(review_id) AS \"Camel\"", str); }
@Override public String toString() { String str; if (!StringUtils.isEmpty(functionName)) { str = toExpr(true); } else if (!StringUtils.isEmpty(expr)) { str = quoteAlias(expr); } else { throw new IllegalArgumentException("expr or functionName should be specified"); } return str; }
Projection { @Override public String toString() { String str; if (!StringUtils.isEmpty(functionName)) { str = toExpr(true); } else if (!StringUtils.isEmpty(expr)) { str = quoteAlias(expr); } else { throw new IllegalArgumentException("expr or functionName should be specified"); } return str; } }
Projection { @Override public String toString() { String str; if (!StringUtils.isEmpty(functionName)) { str = toExpr(true); } else if (!StringUtils.isEmpty(expr)) { str = quoteAlias(expr); } else { throw new IllegalArgumentException("expr or functionName should be specified"); } return str; } Projection();  Projection(Projection other);  Projection(String expr, String functionName, List<String> args, String outputFieldName); }
Projection { @Override public String toString() { String str; if (!StringUtils.isEmpty(functionName)) { str = toExpr(true); } else if (!StringUtils.isEmpty(expr)) { str = quoteAlias(expr); } else { throw new IllegalArgumentException("expr or functionName should be specified"); } return str; } Projection();  Projection(Projection other);  Projection(String expr, String functionName, List<String> args, String outputFieldName); String getExpr(); String getFunctionName(); List<String> getArgs(); String getOutputFieldName(); @Override String toString(); }
Projection { @Override public String toString() { String str; if (!StringUtils.isEmpty(functionName)) { str = toExpr(true); } else if (!StringUtils.isEmpty(expr)) { str = quoteAlias(expr); } else { throw new IllegalArgumentException("expr or functionName should be specified"); } return str; } Projection();  Projection(Projection other);  Projection(String expr, String functionName, List<String> args, String outputFieldName); String getExpr(); String getFunctionName(); List<String> getArgs(); String getOutputFieldName(); @Override String toString();  }