|
Algorithm 1 RSP-QL Query Reuse Compatibility Check |
-
Require:
Existing executing query and candidate query
-
Ensure:
Returns only when the result stream of can be reused for
-
1:
procedure CanReuseQuery()
-
2:
ParseRSPQL
-
3:
ParseRSPQL
-
4:
if not SupportedQueryShape() or not SupportedQueryShape() then
-
5:
return
-
6:
end if
-
7:
GetWindowDefinition(Pe)
-
8:
GetWindowDefinition(Pc)
-
9:
if then
-
10:
return
-
11:
end if
-
12:
if or then
-
13:
return
-
14:
end if
-
15:
if then
-
16:
return
-
17:
end if
-
18:
ExtractBasicGraphPattern(Pe)
-
19:
ExtractBasicGraphPattern(Pc)
-
20:
MatchGraphPatterns(Be, Bc)
-
21:
if not then
-
22:
return
-
23:
end if
-
24:
if not SameResultSemantics() then
-
25:
return
-
26:
end if
-
27:
return
-
28:
end procedure
|