Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





#Java - Code Snippets for '#Org.apache.calcite.rex.RexCall' - 1 code snippet(s) found

 Sample 1. Code Sample / Example / Snippet of org.apache.calcite.rex.RexCall

  private boolean addFilter(RexNode filter, Object[] filterValues) {

if (filter.isA(SqlKind.EQUALS)) {

final RexCall call = (RexCall) filter;

RexNode left = call.getOperands().get(0);

if (left.isA(SqlKind.CAST)) {

left = ((RexCall) left).operands.get(0);

}

final RexNode right = call.getOperands().get(1);

if (left instanceof RexInputRef

&& right instanceof RexLiteral) {

final int index = ((RexInputRef) left).getIndex();

if (filterValues[index] == null) {

filterValues[index] = ((RexLiteral) right).getValue2().toString();

return true;

}

}

}

return false;

}


   Like      Feedback      org.apache.calcite.rex.RexCall



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner