Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
be25a587
Commit
be25a587
authored
Jul 30, 2020
by
Alessio Netti
Browse files
Analytics: using tolerance parameter in PersystSQL for fuzzy queries
parent
409c9140
Changes
1
Hide whitespace changes
Inline
Side-by-side
analytics/operators/persystsql/PerSystSqlOperator.cpp
View file @
be25a587
...
...
@@ -145,6 +145,7 @@ void PerSystSqlOperator::compute(U_Ptr unit, qeJobData& jobData) {
// Clearing the buffer, if already allocated
_buffer
.
clear
();
size_t
elCtr
=
0
;
uint64_t
tolerance_ms
=
(
uint64_t
)
_interval
*
3
/
2
;
uint64_t
my_timestamp
=
getTimestamp
()
-
_go_back_ns
;
// Job units are hierarchical, and thus we iterate over all sub-units associated to each single node
std
::
vector
<
std
::
string
>
vectorOfSensorNames
;
...
...
@@ -166,7 +167,7 @@ void PerSystSqlOperator::compute(U_Ptr unit, qeJobData& jobData) {
LOG
(
debug
)
<<
"PerSystSql Operator: No names found for vectorOfSensorNames "
;
return
;
}
if
(
!
_queryEngine
.
querySensor
(
vectorOfSensorNames
,
my_timestamp
,
my_timestamp
,
_buffer
,
false
))
{
if
(
!
_queryEngine
.
querySensor
(
vectorOfSensorNames
,
my_timestamp
,
my_timestamp
,
_buffer
,
false
,
tolerance_ms
*
1000000
))
{
LOG
(
debug
)
<<
"PerSystSql Operator "
<<
_name
<<
" cannot read vector sensor "
<<
(
*
vectorOfSensorNames
.
begin
())
<<
"!"
;
}
uint64_t
measurement_ts
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment