ClickHouse / ClickHouse/clickhouse-java

Table with transaction column name not parsed

オープン
#1,477 コメント 7 件 リアクション 1 件 担当者 0 名 GitHub で見る
bug jdbc-v1 jdbc-v2 usability
主要言語
Java
スター
1.6k
フォーク
636
平均マージ
2日 23時間
マージ済み PR(30日)
29

説明

### Describe the bug
Table with transaction column name not parsed

```
create table test_execute_batch(a Int32, transaction String)engine=Memory
```

### Expected behaviour
It should be parsed and the table should be created.

### Code example
```
Assert.assertFalse(stmt.execute("drop table if exists test_execute_batch; "
+ "create table test_execute_batch(a Int32, transaction String)engine=Memory"), "Should not have result set");
```
### Error log
2023-10-23 10:44:09:447 -0400 [main] WARN ClickHouseSqlParser - Parse error at line 1, column 83. Encountered: transaction. If you believe the SQL is valid, please feel free to open an issue on Github with this warning and the following SQL attached.
drop table if exists test_execute_batch; create table test_execute_batch(a Int32, transaction String)engine=Memory

java.sql.SQLException: Code: 62. DB::Exception: Syntax error (Multi-statements are not allowed): failed at position 40 (end of query): ; create table test_execute_batch(a Int32, transaction String)engine=Memory. . (SYNTAX_ERROR) (version 23.2.4.12 (official build))
, server ClickHouseNode [uri=http://localhost:49238/test_statement]@1568086

### Configuration
#### Environment
* Client version:
* Language version:
* OS:

#### ClickHouse server
* ClickHouse Server version:
* ClickHouse Server non-default settings, if any:
* `CREATE TABLE` statements for tables involved:
* Sample data for all these tables, use [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/master/programs/obfuscator/Obfuscator.cpp#L42-L80) if necessary

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

ClickHouseSqlParser から始め、transaction をカラム名として、示されている CREATE TABLE 文を再現します。提供されている Assert.execute の例を回帰シナリオとして使用します。文が警告なしでパースされ、テーブルが正常に作成されれば完了です。

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

評価

技術スタック
java, sql
領域
backend, databases
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

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

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