Skip to content

Alias columns in view do not work in some contexts #28687

Closed

Description

@tavplubix
:) create view alias (dummy int, n alias dummy) as select * from system.one
:) select n from alias

┌─n─┐
│ 0 │
└───┘

1 rows in set. Elapsed: 0.015 sec. 

:) select * from alias where n=0

Received exception from server (version 21.10.1):
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Missing columns: 'n' while processing query: 'SELECT dummy FROM system.one WHERE n = 0', required columns: 'dummy' 'n', maybe you meant: ['dummy']. (UNKNOWN_IDENTIFIER)

Activity

  1. added
    potential bug
    bug
    and removed
    potential bug
    on Sep 7, 2021
  2. alexey-milovidov commented on Oct 25, 2022

    @alexey-milovidov
    Member

    @kitaisreal said it will start working in #31796

  3. added a commit that references this issue on Apr 3, 2024
  4. added
    comp-ddl
    on Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcomp-ddl

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions