Skip to content

Placeholder error with clickhouse-jdbc and pxf #75

@dlkrt

Description

@dlkrt

Использую драйвер 0.6.3 clickhouse-jdbc в pxf greenplum com.clickhouse.jdbc.ClickHouseDriver. Сразу скажу, все указанное далее не воспроизводится при прямом подключении к клику, только с bulk. Две проблемы:

Авторизация при указании кредов в jdbc.user jdbc.password не работает. Пытается автоизоваться с default юзером. Фикс - указать креды в query_params или Autorization: basic header.

Если обходим, выполняются несколько select запросов
2025/02/07 09:11:15.501168 DEBUG: query database=prod&extremes=0&query_id=1721E20A22BDF91A&session_timeout=60 select currentUser() user, timezone() timezone, version() version, toUInt8(ifnull((select value from system.settings where name = 'readonly'), '0')) as readonly, toInt8(ifnull((select value from system.settings where name = 'throw_on_unsupported_query_inside_transaction'), '-1')) as throw_on_unsupported_query_inside_transaction, (ifnull((select value from system.settings where name = 'wait_changes_become_visible_after_commit_mode'), '')) as wait_changes_become_visible_after_commit_mode,toInt8(ifnull((select value from system.settings where name = 'implicit_transaction'), '-1')) as implicit_transaction, toUInt64(ifnull((select value from system.settings where name = 'max_insert_block_size'), '0')) as max_insert_block_size, toInt8(ifnull((select value from system.settings where name = 'allow_experimental_lightweight_delete'), '-1')) as allow_experimental_lightweight_delete, (ifnull((select value from system.settings where name = 'custom_jdbc_config'), '')) as custom_jdbc_config FORMAT RowBinaryWithNamesAndTypes

2025/02/07 09:11:15.529887 DEBUG: query compress=1&database=prod&extremes=0&query_id=1821E20A22BDF920&session_timeout=60 SELECT test FROM test123111 WHERE 0
Затем драйвер пишет ошибку
PXF server error : Can't set parameter at index 1 due to no JDBC style '?' placeholder found in the query
И новых запросов нет. Как-то можно починить?

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