Skip to content

Check column for __getScalar() (avoids assertion)#7599

Merged
alexey-milovidov merged 2 commits intoClickHouse:masterfrom
azat:__getScalar-fix
Nov 3, 2019
Merged

Check column for __getScalar() (avoids assertion)#7599
alexey-milovidov merged 2 commits intoClickHouse:masterfrom
azat:__getScalar-fix

Conversation

@azat
Copy link
Member

@azat azat commented Nov 3, 2019

Category (leave one):
-non-significant

Can be triggered using the following query:

  CREATE TABLE foo (key String, macro String MATERIALIZED __getScalar(key)) Engine=Null();

Trace:

    3. 0x00007ffff6d5d526 __assert_fail (libc.so.6)
    4. 0x00007ffff41fd931 boost::intrusive_ptr<DB::IColumn const>::operator*() const (libclickhouse_functionsd.so)
    5. 0x00007ffff41fcd64 COW<DB::IColumn>::IntrusivePtr<DB::IColumn const>::operator*() const & (libclickhouse_functionsd.so)
    6. 0x00007ffff4dc5944 DB::FunctionGetScalar::getReturnTypeImpl() const (libclickhouse_functionsd.so)

(Even though it is internal I guess it is better to fix it)

Refs: #7392
Cc: @amosbird

Can be triggered using the following query:
  CREATE TABLE foo (key String, macro String MATERIALIZED __getScalar(key)) Engine=Null();

Trace:
    3. 0x00007ffff6d5d526 __assert_fail (libc.so.6)
    4. 0x00007ffff41fd931 boost::intrusive_ptr<DB::IColumn const>::operator*() const (libclickhouse_functionsd.so)
    5. 0x00007ffff41fcd64 COW<DB::IColumn>::IntrusivePtr<DB::IColumn const>::operator*() const & (libclickhouse_functionsd.so)
    6. 0x00007ffff4dc5944 DB::FunctionGetScalar::getReturnTypeImpl() const (libclickhouse_functionsd.so)

(Even though it is internal I guess it is better to fix it)

Refs: ClickHouse#7392
Cc: @amosbird
Copy link
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing functional test.

@azat
Copy link
Member Author

azat commented Nov 3, 2019

I thought that since it is internal, tests is not needed, anyway added.

@alexey-milovidov alexey-milovidov merged commit a8d6843 into ClickHouse:master Nov 3, 2019
@amosbird
Copy link
Collaborator

amosbird commented Nov 4, 2019

Thanks!

@azat azat deleted the __getScalar-fix branch November 4, 2019 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants