Skip to content

Incorrect recursive defaults on insert #8603

Closed

Description

@tavplubix

How to reproduce

CREATE TABLE defaults (i Int8, n UInt8 DEFAULT 42, s String DEFAULT concat('test', CAST(n, 'String'))) ENGINE=Memory
INSERT INTO defaults FORMAT JSONEachRow {"i":0, "n": 0}
SELECT * FROM defaults
┌─i─┬─n─┬─s──────┐
│ 0 │ 0 │ test42 │
└───┴───┴────────┘

(it works this way for all formats)

Expected behavior

┌─i─┬─n─┬─s──────┐
│ 0 │ 0 │ test0  │
└───┴───┴────────┘

Activity

  1. added
    bug
    on Jan 10, 2020
  2. filimonov commented on Feb 21, 2020

    @filimonov
    Contributor

    Related to bug #2283

  3. alesapin commented on Mar 3, 2020

    @alesapin
    Member

    Trying to fix here #9489

  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