ClickHouse / ClickHouse/clickhouse-java
Table with transaction column name not parsed
- Ngôn ngữ chính
- Java
- Star
- 1.6k
- Fork
- 637
- Merge trung bình
- 2 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 29
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu từ ClickHouseSqlParser và tái hiện câu lệnh CREATE TABLE được hiển thị với transaction làm tên cột. Sử dụng ví dụ Assert.execute được cung cấp làm kịch bản hồi quy. Được xem là hoàn tất khi câu lệnh được phân tích cú pháp mà không có cảnh báo và bảng được tạo thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, sql
- Lĩnh vực
- backend, databases
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100