Search Java Code Snippets


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





Java - Code Samples

 Sample 1. Code Sample / Example / Snippet of org.apache.calcite.sql.validate.SqlValidatorNamespace

  public void checkMonotonic(String query,

SqlMonotonicity expectedMonotonicity) {

SqlValidator validator = getValidator();

SqlNode n = parseAndValidate(validator, query);

final RelDataType rowType = validator.getValidatedNodeType(n);

final SqlValidatorNamespace selectNamespace = validator.getNamespace(n);

final String field0 = rowType.getFieldList().get(0).getName();

final SqlMonotonicity monotonicity =

selectNamespace.getMonotonicity(field0);

assertThat(monotonicity, equalTo(expectedMonotonicity));

}


   Like      Feedback      org.apache.calcite.sql.validate.SqlValidatorNamespace



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