Skip to content

Cannot use ALIAS columns when inserting into materialized view #2285

Closed

Description

@dqminh

Reproduce as:

CREATE TABLE test1 (
  date Date,
  datetime DateTime,
  zoneId UInt64,
  test ALIAS zoneId == 1
) ENGINE = MergeTree(date, (date, zoneId), 8192);

CREATE MATERIALIZED VIEW test1_view
ENGINE = MergeTree(date, (date, zoneId), 8192)
AS SELECT
  date,
  zoneId,
  test
FROM test1;

insert into test1 values (today(), now(), 1);

INSERT INTO test1 VALUES

Received exception from server (version 1.1.54378):
Code: 10. DB::Exception: Received from clickhouse1:9000, 172.20.0.6. DB::Exception: Not found column test in block. There are only columns: date, datetime, zoneId: while pushing to view default.test1_view.

I think ALIAS column should be usable in this case

cc @vavrusa @i @bocharov

Activity

  1. filimonov commented on Apr 25, 2018

    @filimonov
    Contributor

    probably related: #2283

  2. self-assigned this
    on Apr 9, 2019
  3. added
    comp-materialized-view
    on May 6, 2019
  4. stale commented on Oct 20, 2019

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  5. KochetovNicolai commented on Nov 26, 2019

    @KochetovNicolai
    Member

    #7911 is not connected with this issue. Already works at master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

comp-materialized-view

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions