Skip to content

Tag: clickhouse

How to split an array in Clickhouse based on custom condition

I am trying to find a way to split my array when the next element is smaller than the previous element. Here is some sample data [100, 200, 500, 100, 150, 200] I need to convert this to [[100, 200, 500],[100, 150, 200]] I am trying to calculate the running difference of the array and I need to handle the

How to parse a Clickhouse-SQL statement using ANTRL4?

Objective : Add an additional WHERE clause to any given Clickhouse statement. I’m using the following Antlr grammars to generate Java classes for a lexer & parser. Lexer grammar https://github.com/ClickHouse/ClickHouse/blob/master/utils/antlr/ClickHouseLexer.g4 Parser grammar https://github.com/Clic…