testcontainers / testcontainers/testcontainers-java

Clickhouse setting config failed

Open
#4,120 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

I need use experimental function of ClickHouse.
For it use version 21.5.5.12
spring:
data-source:
url: jdbc:tc:clickhouse:21.5.5.12://hostname/databasename?TC_INITSCRIPT=init.sql

And init.sql contains this line:
SET allow_experimental_window_functions = 1;

on this line i have next error:
Request processing failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [SET allow_experimental_window_functions = 1]; SQL state [null]; error code [113]; ClickHouse exception, code: 113, host: localhost, port: 32811; Code: 113, e.displayText() = DB::Exception: There is no session or session context has expired (version 21.5.5.12 (official build))
; nested exception is ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 113, host: localhost, port: 32811; Code: 113, e.displayText() = DB::Exception: There is no session or session context has expired (version 21.5.5.12 (official build))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the ClickHouse 21.5.5.12 JDBC URL and the init.sql statement shown in the report. Start by tracing how the Testcontainers JDBC URL runs init.sql and how the ClickHouse container handles session-scoped settings. Done means the experimental setting can be applied from init.sql without the session-context error.

Written by the indexing model from the issue text.

Assessment

Tech stack
clickhouse, docker, java
Domain
databases, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.