OpenMLDB icon indicating copy to clipboard operation
OpenMLDB copied to clipboard

When copying the following DDL statement, CLI has a lot of strange information output

Open wuyou10206 opened this issue 1 year ago • 2 comments

Bug Description When copying the following DDL statement, CLI has a lot of strange information output b24148abfb9312a38e99a609662e30d7

  • 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

wuyou10206 avatar Sep 05 '22 02:09 wuyou10206

lines truncated. does it success ?

aceforeverd avatar Sep 05 '22 03:09 aceforeverd

not support mutil commands with interactive mode in sql_cilent. you can execute with file as below: bin/openmldb --zk_cluster=127.0.0.1:2181 --zk_root_path=/openmldb --role=sql_client < sql.txt

dl239 avatar Sep 05 '22 06:09 dl239

we should support execute multiple sql string, tag as enhancement

aceforeverd avatar Oct 25 '22 05:10 aceforeverd

only execute the first sql currently WX20230202-173602

dl239 avatar Feb 02 '23 09:02 dl239