4paradigm / 4paradigm/OpenMLDB

[TBC] CLI does not support multiple SQL strings

Đang mở
#2,432 4 bình luận 0 reaction 1 người được giao Được @dl239 nhận Xem trên GitHub
bug enhancement high-priority
Ngôn ngữ chính
C++
Star
1.7k
Fork
331
Merge trung bình
12 ngày 12 giờ
Pull request đã merge (30 ngày)
1

Mô tả

**Bug Description**
When copying the following DDL statement, CLI has a lot of strange information output
![b24148abfb9312a38e99a609662e30d7](https://user-images.githubusercontent.com/18275570/188352464-45cfe9bf-8aec-415d-9d2d-4be2b753f1ea.png)

+ sql
```sql
create table test_memory_absolute(
yumid string,
user_code string,
md5_usercode string,
cross_dp_tag string,
repeat_dp_tag string,
usercode_tail string,
insert_time timestamp,
update_time string,
city string,
city_code bigint,
cross_dp_tag_posterior string,
repeat_dp_tag_posterior string,
p_update_date int,
index(key=(user_code,update_time),ttl=0m,ttl_type=absolute),
index(key=(md5_usercode,update_time),ttl=0m,ttl_type=absolute),
index(key=(yumid,update_time),ttl=0m,ttl_type=absolute))
options(partitionnum=1,replicanum=1,storage_mode='memory'
);
create table test_ssd_absolute(
yumid string,
user_code string,
md5_usercode string,
cross_dp_tag string,
repeat_dp_tag string,
usercode_tail string,
insert_time timestamp,
update_time string,
city string,
city_code bigint,
cross_dp_tag_posterior string,
repeat_dp_tag_posterior string,
p_update_date int,
index(key=(user_code,update_time),ttl=0m,ttl_type=absolute),
index(key=(md5_usercode,update_time),ttl=0m,ttl_type=absolute),
index(key=(yumid,update_time),ttl=0m,ttl_type=absolute))
options(partitionnum=1,replicanum=1,storage_mode='ssd'
);
```

**Expected Behavior**
Prompt: create successfully

**Steps to Reproduce**

1.
2.
3.
4.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

The issue shows a multi-statement SQL script causing strange output in the CLI. Look at the CLI's SQL parser and execution logic, likely in a command-line interface component. Start by reproducing the issue with the provided SQL, then examine how the CLI handles multiple CREATE TABLE statements. Check for parsing errors or output formatting bugs when processing multiple SQL strings.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cli, sql
Lĩnh vực
cli, 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
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.