Comments (8)
we are having the same problem, it only started happening after we updated clickhouse to 24.4.1 revision 54467
for us the query is like this
SELECT
'current' as period,
date(event_time,'America/Los_Angeles') as label,
arrayFilter(x -> dateDiff('day', event_time, toDateTime(parseDateTime64BestEffortOrZero(JSONExtractString(x, 'event_time')))) >= 0 and dateDiff('day', event_time, toDateTime(parseDateTime64BestEffortOrZero(JSONExtractString(x, 'event_time')))) < 14, workflows) as a
FROM
orders
WHERE
domain_id='xxx'
AND date(event_time,'America/Los_Angeles') BETWEEN '2024-04-07' AND '2024-05-07'
limit 20
when removing the arrayFilter, query works
from clickhouse.
Issues are simpler to investigate if you provide reproducible examples -> https://fiddle.clickhouse.com/
from clickhouse.
also just checked this problem is only happening with distributed tables, i tried running the same query on the local table and it is working fine.
from clickhouse.
Issues are simpler to investigate if you provide reproducible examples -> https://fiddle.clickhouse.com/
CREATE TABLE users (uid Int16, name String, age Int16) ENGINE=Memory;
INSERT INTO users VALUES (1231, 'John', 33);
INSERT INTO users VALUES (6666, 'Ksenia', 48);
INSERT INTO users VALUES (8888, 'Alice', 50);
with test AS (
select uid from users
where age > 40
)
select
uid,
name,
age
from
users
where
uid in (test.uid);
from clickhouse.
it can reproduce with the sql I just posted. @Algunenano
also, you can successfully run the SQL just replace test.uid with test
from clickhouse.
@livingston0318 you should use a subquery
with test AS ( select uid from users where age > 40 )
select uid,name, age
from users
where uid in (select uid from test);
https://fiddle.clickhouse.com/67c86990-4d3f-400b-ab8b-6ca5cbeb59e7
with test AS ( select uid from users where age > 40 )
select uid,name, age
from users
where uid in (test.uid);
Such syntax is not supported by other databases, PG, Mysql. It was an undefined behaviour that it worked before.
I think it's good that it does not work anymore.
The issue should be closed after adding positive and negative tests.
from clickhouse.
Ah, I see, it never worked at all. https://fiddle.clickhouse.com/749eb4c7-5b07-4da9-a640-da57e89a2b6e
from clickhouse.
@den-crane thanks bro, this issue can be closed.
from clickhouse.
Related Issues (20)
- Cannot perform insert in readonly mode
- `02362_part_log_merge_algorithm` is flaky HOT 2
- map inside if statement with default empty map value fails when accessed through distributed table HOT 1
- Analyzer: Bad cast from type DB::FunctionNode to DB::ColumnNode. (LOGICAL_ERROR)
- Variant type: "Invalid Field get from type Null to type Array"
- Support dot syntax access field for Map type column HOT 1
- Select Query Raise Error: Size of filter doesn't match size of column HOT 2
- `select count(distinct xx) from tab` does not support external storage ? HOT 2
- Antlr g4 file insertStmt cant parser SQL correctly. HOT 2
- Performance of Alpine vs. Ubuntu based docker images of Clickhouse: any difference? HOT 4
- tcp_keep_alive_timeout seems not set for MySQL connection
- Clickhouse remote table function returns incomplete results HOT 4
- `key16` aggregation method should be two level
- Enforce higher pipeline parallelism when the number of reading streams is low
- Fail to build in Mac M1 HOT 1
- Regarding the issue of ClickHouse encountering an out-of-memory problem when querying array fields. HOT 3
- XZ HOT 1
- Feature Request: Table setting `final` to force any queries on specific table to use FINAL
- Expose `SimpleMergeSelector` settings via `MergeTreeSettings` HOT 1
- Support for upcoming Kafka 4.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clickhouse.