Skip to content

Commit

Permalink
[warehouse] bugfix tdengine store query by instance error
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsun28 committed Jun 7, 2023
1 parent 5dd65c7 commit ee1ebcf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public class HistoryTdEngineDataStorage extends AbstractHistoryDataStorage {
private static final String CREATE_SUPER_TABLE_SQL = "CREATE STABLE IF NOT EXISTS `%s` %s TAGS (monitor BIGINT)";
private static final String NO_SUPER_TABLE_ERROR = "Table does not exist";
private static final String QUERY_HISTORY_WITH_INSTANCE_SQL
= "SELECT ts, instance, %s FROM %s WHERE instance = %s AND ts >= now - %s order by ts desc";
= "SELECT ts, instance, %s FROM %s WHERE instance = '%s' AND ts >= now - %s order by ts desc";
private static final String QUERY_HISTORY_SQL
= "SELECT ts, instance, %s FROM %s WHERE ts >= now - %s order by ts desc";
= "SELECT ts, instance, %s FROM %s WHERE ts >= now - '%s' order by ts desc";
private static final String QUERY_HISTORY_INTERVAL_WITH_INSTANCE_SQL
= "SELECT first(%s), avg(%s), min(%s), max(%s) FROM %s WHERE instance = %s AND ts >= now - %s interval(4h)";
private static final String QUERY_INSTANCE_SQL
Expand Down

0 comments on commit ee1ebcf

Please sign in to comment.