Projet

Général

Profil

0009-engine-hide-NULL-values-of-json-dimensions-in-inline.patch

Benjamin Dauvergne, 03 décembre 2019 15:11

Télécharger (1,26 ko)

Voir les différences:

Subject: [PATCH 09/13] engine: hide NULL values of json dimensions in inline
 join table (#38067)

 bijoe/engine.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
bijoe/engine.py
259 259
            json_key = name[5:]
260 260
            return schemas.Join(
261 261
                name=name,
262
                table='(SELECT DISTINCT %s.%s->>\'%s\' AS value FROM %s ORDER BY value)' % (
263
                    self.fact_table, self.json_field, json_key, self.fact_table),
262
                table=(
263
                    '(SELECT DISTINCT %s.%s->>\'%s\' AS value FROM %s '
264
                    'WHERE %s.%s->>\'%s\' IS NOT NULL ORDER BY value)' % (
265
                        self.fact_table, self.json_field, json_key, self.fact_table,
266
                        self.fact_table, self.json_field, json_key
267
                    )
268
                ),
264 269
                master='%s->>\'%s\'' % (self.json_field, json_key),
265 270
                detail='value',
266 271
            )
267
-