iotdb
iotdb copied to clipboard
set ttl support Multiple time units
Is your feature request related to a problem? Please describe. 大佬您好,当前例如:"set ttl to root.ln 360000",只支持毫米级别的单位,对于设置过期时间长的很不方便,希望可以增加例如:"set ttl to root.ln 180d"这种形式,语法解析和处理应该不是很困难
Describe the solution you'd like 希望可以增加多种时间单位,例如:"set ttl to root.ln 180d"这种形式
Describe alternatives you've considered 修改 org.apache.iotdb.db.qp.sql.IoTDBSqlVisitor#visitSetTTLStatement逻辑,解析最后一个text,按照时间单位转化后赋值给org.apache.iotdb.db.qp.logical.sys.SetTTLOperator#dataTTL就可以解决,SetTTLOperator多加一个字段用来保存set时候的时间,SHOW ALL TTL的时候可以查询这个字段,不知道是否可行