engine: add missing parenthesis around ->> operator (#38932)

This commit is contained in:
Benjamin Dauvergne 2020-01-13 16:04:43 +01:00
parent 16b60621d4
commit 126ddfa812
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ class EngineCube(object):
name=name,
table=(
'(SELECT DISTINCT %s.%s->>\'%s\' AS value FROM %s '
'WHERE %s.%s->>\'%s\' IS NOT NULL ORDER BY value)' % (
'WHERE (%s.%s->>\'%s\') IS NOT NULL ORDER BY value)' % (
self.fact_table, self.json_field, json_key, self.fact_table,
self.fact_table, self.json_field, json_key
)