Zhen Chen created CALCITE-7332:
----------------------------------
Summary: SELECT * EXCLUDE list should error when it excludes every
column
Key: CALCITE-7332
URL: https://issues.apache.org/jira/browse/CALCITE-7332
Project: Calcite
Issue Type: Bug
Components: babel, core
Affects Versions: 1.41.0
Reporter: Zhen Chen
Assignee: Zhen Chen
Fix For: 1.42.0
The SELECT * EXCLUDE statement currently allows the exclusion of all columns,
which is allowed during the parsing phase and does not report any errors during
the execution phase, which is not as expected.
The following case should work.
{code:java}
@Test void testStarExcludeWithEmptyColumn() {
final SqlValidatorFixture fixture = Fixtures.forValidator()
.withParserConfig(p -> p.withParserFactory(SqlBabelParserImpl.FACTORY));
fixture.withSql("select ^*^ exclude(deptno, name) from dept")
.fails("SELECT \\* EXCLUDE list cannot exclude all columns");
} {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)