Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Not found column [..] in block" with clusterAllReplicas #62682

Closed
al13n321 opened this issue Apr 16, 2024 · 7 comments · Fixed by #63047
Closed

"Not found column [..] in block" with clusterAllReplicas #62682

al13n321 opened this issue Apr 16, 2024 · 7 comments · Fixed by #63047
Assignees
Labels
analyzer Issues and pull-requests related to new analyzer bug Confirmed user-visible misbehaviour in official release

Comments

@al13n321
Copy link
Member

This doesn't work:

:) select serverUUID() as s, sum(dummy) from clusterAllReplicas(both, system.one) group by s

[...]
Received exception from server (version 24.4.1):
Code: 10. DB::Exception: Received from localhost:9000. DB::Exception: Not found column serverUUID() in block. There are only columns: sum(__table1.dummy): While executing Remote. (NOT_FOUND_COLUMN_IN_BLOCK)

But this works:

:) select cityHash64(serverUUID()) + dummy as s, sum(dummy) from clusterAllReplicas(both, system.one) group by s

[...]
   ┌───────────────────s─┬─sum(dummy)─┐
1. │ 6220104575184213473 │          0 │
2. │ 7064952209212228648 │          0 │
   └─────────────────────┴────────────┘

2 rows in set. Elapsed: 0.006 sec. 

The cluster is just 2 servers running on localhost:

remote_servers:                                                                                                                                                                                                                        
  both:                                                                                                                                                                                                                                
    shard:                                                                                                                                                                                                                             
      replica:                                                                                                                                                                                                                         
        host: 127.0.0.1                                                                                                                                                                                                                
        port: 9000                                                                                                                                                                                                                     
      replica:                                                                                                                                                                                                                         
        host: 127.0.0.3                                                                                                                                                                                                                
        port: 9010                                                                                                                                                                                                                     
@al13n321 al13n321 added the potential bug To be reviewed by developers and confirmed/rejected. label Apr 16, 2024
@SaltTan
Copy link
Contributor

SaltTan commented Apr 24, 2024

Workaround: set allow_experimental_analyzer=0

@SaltTan
Copy link
Contributor

SaltTan commented Apr 24, 2024

@den-crane
Copy link
Contributor

select identity(serverUUID()) as s, count() 
from remote('127.0.0.{1,2}', system.one)
group by s;

https://fiddle.clickhouse.com/d293f1db-cfb2-47a0-adcf-d803b88a347c

SELECT
    identity(serverUUID()) AS s,
    count()
FROM clusterAllReplicas('replicated', system.one)
GROUP BY s

Query id: a01e4225-f595-43c0-887a-a3ab50901aa1

   ┌─s────────────────────────────────────┬─count()─┐
1. │ 64551af3-6e7a-42d5-88fe-dff568a09455 │       1 │
2. │ a4eb955b-b2b4-4754-9d8c-d6ad667339eb │       1 │
   └──────────────────────────────────────┴─────────┘

@den-crane
Copy link
Contributor

select getMacro('replica') as s, count() from clusterAllReplicas('replicated', system.one) group by s;

Received exception from server (version 24.3.2):
Code: 10. DB::Exception: Received from localhost:9000. DB::Exception: 
Not found column getMacro('replica'_String) in block.
 There are only columns: count(): While executing Remote. (NOT_FOUND_COLUMN_IN_BLOCK)

@den-crane
Copy link
Contributor

den-crane commented Apr 24, 2024

select uptime() as s, count() from clusterAllReplicas('replicated', system.one)  group by s;

Received exception from server (version 24.3.2):
Code: 10. DB::Exception: Received from localhost:9000. DB::Exception:
 Not found column uptime() in block. There are only columns: count(): 
While executing Remote. (NOT_FOUND_COLUMN_IN_BLOCK)

uptime: https://fiddle.clickhouse.com/cf68fb33-988d-453e-9659-2c8a41f34069

timezone: https://fiddle.clickhouse.com/e60a7fca-6fb4-4d14-8f0f-8d261f6415d0

serverTimeZone: https://fiddle.clickhouse.com/1b03f4b1-0c52-477e-a85a-534b5423a1f8

@Algunenano Algunenano added bug Confirmed user-visible misbehaviour in official release analyzer Issues and pull-requests related to new analyzer and removed potential bug To be reviewed by developers and confirmed/rejected. labels Apr 25, 2024
@KochetovNicolai KochetovNicolai self-assigned this Apr 25, 2024
@Algunenano
Copy link
Member

Fix had to be reverted

@Algunenano Algunenano reopened this May 2, 2024
@KochetovNicolai
Copy link
Member

Revert was reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer Issues and pull-requests related to new analyzer bug Confirmed user-visible misbehaviour in official release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants