Skip to content

Commit

Permalink
Fix for crash in query engine
Browse files Browse the repository at this point in the history
query engine was crashing in 2 tag queries in some cases because table schema
from opserver was not being used when table is not static.
Closes-Bug: #1654155

Change-Id: I506a87535c177a70dc81bd3fde85280d1ae223d3
(cherry picked from commit 1cf1049)
  • Loading branch information
bansalnikhil committed Jan 5, 2017
1 parent 6e09e12 commit 32d3463
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/query_engine/where_query.cc
Expand Up @@ -249,7 +249,13 @@ WhereQuery::StatTermParse(QueryUnit *main_query, const rapidjson::Value& where_t
// Where query specified a suffix. Check that it is valid
if (cdesc.suffixes.find(sname)==cdesc.suffixes.end()) return false;

StatsQuery::column_t cdesc2 = m_query->stats().get_column_desc(sname);
// The suffix attribute MUST exist in the schema
StatsQuery::column_t cdesc2;
if (m_query->stats().is_stat_table_static()) {
cdesc2 = m_query->stats().get_column_desc(sname);
} else {
cdesc2 = get_column_desc(table_schema, sname);;
}
QE_ASSERT ((cdesc2.datatype == QEOpServerProxy::STRING) ||
(cdesc2.datatype == QEOpServerProxy::UINT64));

Expand Down

0 comments on commit 32d3463

Please sign in to comment.