Cpaulyz opened a new pull request, #12306: URL: https://github.com/apache/iotdb/pull/12306
## Description In #12174, we apply some optimization on deleting time series by pattern ended with multi-level wildcard(**). However, some corner cases were ignored, which led to inconsistent bahavior with orgin version. For example, if time series `root.db.d1.s1` is represented by template, it should not be deleted if client executs command `delete timeseries root.**`. This PR fix this problem. Reprodeuce step: ```SQL # 1. create template create database root.sg; create schema template t1 aligned (s_name TEXT, s_status BOOLEAN, start_time INT64, s_lat FLOAT encoding=Gorilla, s_lon FLOAT encoding=Gorilla); show schema templates; show nodes in schema template t1; # 2. set show paths set schema template t1; set schema template t1 to root.sg; show paths set schema template t1; # 3. activate show paths using schema template t1; create timeseries of schema template on root.sg.d1; create timeseries using schema template on root.sg.d2; show paths using schema template t1;show child nodes root.sg.d1; insert into root.sg.d1(time, s_name, s_status, start_time, s_lat, s_lon) values (1, 'arrow', true, 1697167800000, 3.5, 435.67); insert into root.sg.d2(time, s_name, s_status, start_time, s_lat, s_lon) values (2, 'Ed', true, 1697166600000, 13.5, 135.33); alter schema template t1 add (s_speed double); show nodes in schema template t1;insert into root.sg.d3(time, s_name, s_status, start_time, s_lat, s_lon) values (3, 'Jean', true, 1697167600000, 3.5, 15.11); select * from root.sg.** align by device;insert into root.sg.d1(time, s_speed) values (1, 109.36); insert into root.sg.d3(time, s_speed) values (3, 409.19); select * from root.sg.** align by device; insert into root.sg.d1(time, s_name, s_status, s_lon2) values (1, null, true, 100.45); insert into root.sg.d2(time, s_name, s_status, s_lon2) values (2, 'aya', false, 300.03); # show nodes in template show nodes in schema template t1;select start_time,s_lat,s_lon2,s_speed,s_status,s_name,s_lon from root.sg.** align by device; # Delete template series as nornal time series, expect exception 508 delete timeseries root.sg.d1.**; delete timeseries root.sg.**; show timeseries; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
