⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

[BUG] JSQLParser 5.4-SNAPSHOT : Clickhouse : SAMPLE not supported in Clickhouse SELECT #2363

@tomershay

Description

@tomershay

Failing SQL Feature:

The SAMPLE clause in ClickHouse lets you run a SELECT query on only a fraction of the data (a subset) to get fast approximate results by specifying a sample ratio or number.

Reproduce the issue with this query:

CREATE TABLE tmp.events
(
    id UInt64,
    user_id UInt32,
    timestamp DateTime
)
ENGINE = MergeTree()
ORDER BY id
SAMPLE BY id;

SELECT *
FROM events
SAMPLE 0.1;

Parsing error:

ParseException: Encountered: <K_SAMPLE> / "SAMPLE", at line 3, column 1, in lexical

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions