Open chendaxixi opened 6 years ago
@kr11 @jixuan1989
If we decide to integrate KV-match of ICDE 2019 to IoTDB (according to the Apache incubation proposal), it's better to support multiple (at least 4) types of queries with one single index (RSM-ED, RSM-DTW, cNSM-ED, cNSM-DTW).
So the syntax of the query statement should be robust enough to support all of them. Following is the initial plan in my opinion.
SELECT kv-match(<pattern_path>, <parameter_1[,parameter_2,...]>) FROM <query_path> WHERE <time_criterion>
<pattern_path>
It's better it can receive a sub-query with where clause on time, to use a subsequence as pattern.
<parameter_1[,parameter_2,...]>
RSM-ED:
SELECT kv-match(<pattern_path>, "RSM-ED", <epsilon>) FROM <query_path> WHERE <time_criterion>
RSM-DTW:
SELECT kv-match(<pattern_path>, "RSM-DTW", <epsilon>, <rho>) FROM <query_path> WHERE <time_criterion>
Where <rho>
is the constraint on the warping path of DTW measure.
cNSM-ED:
SELECT kv-match(<pattern_path>, "cNSM-ED", <epsilon>, <alpha>, <beta>) FROM <query_path> WHERE <time_criterion>
Where <alpha>
and <beta>
are the constraints on mean value and standard deviation differences (refer to the paper).
cNSM-DTW:
SELECT kv-match(<pattern_path>, "cNSM-DTW", <epsilon>, <rho>, <alpha>, <beta>) FROM <query_path> WHERE <time_criterion>
Where <rho>
is the constraint on the warping path of DTW measure, and <alpha>
and <beta>
are the constraints on mean value and standard deviation differences (refer to the paper).
If you have any plan or suggestion on the integration, please let me know.
kvindex的查询语法确认: 原先的kvindex(f_index_pr实现的)的查询语法为: select kvindex(queryPath, patternPath, pattern starttime, pattern endtime, epsilon (,alpha, beta)) from queryPath WhereClause 之后和向东学长讨论的查询语法有: