Java Code Examples for org.apache.calcite.sql.validate.SqlDelegatingConformance

The following examples show how to use org.apache.calcite.sql.validate.SqlDelegatingConformance. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Bats   Source File: SqlParser.java    License: Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unused")
@Deprecated // to be removed before 2.0
public ConfigBuilder setAllowBangEqual(final boolean allowBangEqual) {
  if (allowBangEqual != conformance.isBangEqualAllowed()) {
    setConformance(
        new SqlDelegatingConformance(conformance) {
          @Override public boolean isBangEqualAllowed() {
            return allowBangEqual;
          }
        });
  }
  return this;
}
 
Example 2
Source Project: calcite   Source File: SqlParser.java    License: Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unused")
@Deprecated // to be removed before 2.0
public ConfigBuilder setAllowBangEqual(final boolean allowBangEqual) {
  if (allowBangEqual != conformance.isBangEqualAllowed()) {
    setConformance(
        new SqlDelegatingConformance(conformance) {
          @Override public boolean isBangEqualAllowed() {
            return allowBangEqual;
          }
        });
  }
  return this;
}
 
Example 3
Source Project: calcite   Source File: SqlToRelConverterTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test void testWindowAndGroupByWithDynamicStar() {
  final String sql = "SELECT\n"
      + "n_regionkey,\n"
      + "MAX(MIN(n_nationkey)) OVER (PARTITION BY n_regionkey)\n"
      + "FROM (SELECT * FROM SALES.NATION)\n"
      + "GROUP BY n_regionkey";

  sql(sql).conformance(new SqlDelegatingConformance(SqlConformanceEnum.DEFAULT) {
    @Override public boolean isGroupByAlias() {
      return true;
    }
  }).with(getTesterWithDynamicTable()).ok();
}