diff --git a/src/parser/analyzer.c b/src/parser/analyzer.c
index 28d312142ddca8a33b580d06b1503d4d2248de7d..dea83d7e0c828d8966fbffe9e91a2895c466fdf7 100644 (file)
--- a/src/parser/analyzer.c
+++ b/src/parser/analyzer.c
}
if (context != UNSPEC_CONTEXT) {
}
if (context != UNSPEC_CONTEXT) {
- /* skip this check if we don't know the context; it's up to the
+ /* skip these checks if we don't know the context; it's up to the
* caller to check again once the right context information is
* available */
if ((context != SDB_ATTRIBUTE) && (v->type == SDB_FIELD_VALUE)) {
* caller to check again once the right context information is
* available */
if ((context != SDB_ATTRIBUTE) && (v->type == SDB_FIELD_VALUE)) {
SDB_FIELD_TO_NAME(context));
return -1;
}
SDB_FIELD_TO_NAME(context));
return -1;
}
+ if ((context != SDB_METRIC) && (v->type == SDB_FIELD_TIMESERIES)) {
+ sdb_strbuf_sprintf(errbuf, "Invalid expression %s.timeseries",
+ SDB_FIELD_TO_NAME(context));
+ return -1;
+ }
}
return 0;
} /* analyze_value */
}
return 0;
} /* analyze_value */