VISUALISE fails on Apache Doris via ODBC: temp table name is double-quoted (`DROP TABLE IF EXISTS "__ggsql_global_..."`)

オープン
#628 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 6 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
backend, database

調査の方向性

Read #570 and #569 first to see the planned Doris alias and the merged MySQL/MariaDB dialect and fallback; inspect the ODBC connection dialect detection and temporary-table creation paths. Reproduce with Apache Doris 2.1.7 over MariaDB ODBC using the supplied VISUALISE query. Done when the visualization works through the Doris connection, with identifier quoting or local-cache fallback verified.

索引モデルが issue の本文から書いたものです。

説明

Summary

When ggsql is connected to Apache Doris over ODBC (MariaDB ODBC driver), plain SQL queries work, but any query with a VISUALISE clause fails. ggsql creates its intermediate global table with ANSI double-quoted identifiers, and Doris (MySQL dialect) reads "..." as a string literal instead of an identifier.

Environment

ggsql 0.5.2 (Positron extension ggsql.ggsql-0.5.2-darwin-arm64, bundled ggsql-jupyter kernel)
IDE Positron 2026.12.0
OS macOS (Darwin 27.2.0, arm64)
Database Apache Doris 2.1.7 (@@version_comment = Doris version doris-2.1.7-rc03-443e87e203, @@version = 5.7.99)
Driver MariaDB Connector/ODBC 3.2.10 ([MariaDB ODBC] in odbcinst.ini)
Connection ODBC reader (MariaDB ODBC driver) in the Positron ggsql console

Reproducible example

  1. Connect a ggsql console to Doris through the MariaDB ODBC driver.
  2. A plain query works:
SELECT 1 AS x, 2 AS y
shape: (1, 2)
x	y
1	2
  1. Any visualization fails:
SELECT * FROM (VALUES (1, 2), (2, 4), (3, 3), (4, 6)) AS t(x, y)
VISUALISE x AS x, y AS y
DRAW point
Data source error: ODBC execute failed: [HY000] [ma-3.2.10][5.7.99]errCode = 2, detailMessage = Syntax error in line 1:
DROP TABLE IF EXISTS "__ggsql_global_0d197b9d5376...
                     ^
Encountered: STRING LITERAL
Expected: IDENTIFIER

The same error occurs when the data comes from a real Doris table (e.g. SELECT l_date, COUNT(*) AS n FROM some_table WHERE ... GROUP BY l_date VISUALISE l_date AS x, n AS y DRAW line).

What I tried

  • SET sql_mode = 'ANSI_QUOTES' in the same console session, then re-running the plot: same error. (Doris does not seem to honour ANSI_QUOTES for this statement, or the setting doesn't apply to the connection ggsql uses for the temp table.)
  • Workaround that works: aggregate in Doris, export the result to CSV, load it in a separate ggsql session on the default in-memory DuckDB reader, and plot there.

Expected behaviour

Either of these would fix it:

  • Detect Doris (and other MySQL-protocol systems behind ODBC, e.g. when the DBMS reports a MySQL-compatible version) as the MySQL/MariaDB dialect and quote identifiers with backticks, or
  • If temp-table creation fails, fall back to the local cache instead of erroring.

Related

  • #570 lists Apache Doris and StarRocks as planned aliases for the MySQL dialect.
  • #569 (merged after 0.5.2) adds a MySQL/MariaDB dialect and a "try temp table, otherwise use a cache" fallback. That may already fix this. If so, a release containing it, plus mapping Doris to that dialect when connecting over ODBC, would resolve this issue.
  • #496: caching layer (duckdb+odbc://...).

Happy to test a development build against Doris 2.1.7 if that helps.

主要言語
Rust
スター
575
フォーク
33
平均マージ
7日 18時間
マージ済み PR(30日)
11

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

posit-dev/ggsql のほかの issue

posit-dev/ggsql の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。