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

The following examples show how to use org.apache.calcite.sql.validate.SqlDelegatingConformance. 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 File: SqlParser.java    From Bats with 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 File: SqlParser.java    From calcite with 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 File: SqlToRelConverterTest.java    From calcite with 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();
}