You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the query I ran when I saw this error in the log:
- transaction_avg:
driver: mysqlconnection:
host: mysqlport: 3306user: rootpassword: unsecuredatabase: testsql: > select avg(trans_end - trans_start) AS trans_avg from business_trans where trans_end is not null and trans_end between adddate(CURRENT_TIMESTAMP, INTERVAL -1 MINUTE) and CURRENT_TIMESTAMP;interval: 5sdata-field: trans_avg
I will have to check if NVL is possible to use when not rows are returned.
Anyway, in the scenario when data field is available and data value is null the error log is not that clear that the query just returned null which is not supported to handle at the time. Introducing a data value check for nil and just print it out that data was null will be a very small change but more understandable for the user of prometheus-sql what to fix. :)
It seems that if a SQL statement executes successfully and return with null the following error is seen in the logs:
This error is not that which is also easily fixed by doing a nil check on
dataVal
in set.go.The text was updated successfully, but these errors were encountered: