[
https://issues.apache.org/jira/browse/CALCITE-7332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zhen Chen updated CALCITE-7332:
-------------------------------
Summary: SELECT * EXCLUDE list should error when it excludes all columns
(was: SELECT * EXCLUDE list should error when it excludes every column)
> SELECT * EXCLUDE list should error when it excludes all columns
> ---------------------------------------------------------------
>
> 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
> Priority: Major
> 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)