You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "kaya-abdullah (via GitHub)" <gi...@apache.org> on 2026/10/09 01:14:57 UTC
Re: [I] query with json_value using returing clause no longer works [superset]
kaya-abdullah commented on issue #36954:
URL: https://github.com/apache/superset/issues/36954#issuecomment-6072247045
I looked into this on current master, since it came up as a candidate for closing.
**Druid works on master.** sqlglot parses `JSON_VALUE ... RETURNING` for the Druid dialect since 30.12.0 (tobymao/sqlglot#7771). The `7.0` branch requires `sqlglot>=30.17.0` and master `>=30.19.0`, so the query from the report goes through `SQLScript(sql, "druid")` without errors:
```sql
SELECT JSON_VALUE(Histogram, CONCAT('$[''', duration, ''']') RETURNING BIGINT) AS aantal FROM t
```
No released version has it yet: 6.x still pins `sqlglot<29`, so the fix ships with 7.0. With sqlglot 30.11.0 the same call fails with the error from the report.
**Postgres still fails** on master with `Error parsing near 'returning'`. Postgres 17 accepts the clause, but sqlglot's Postgres dialect does not register `JSON_VALUE` yet, so that part needs an upstream change in sqlglot.
I can open a small PR here with a regression test for the Druid case, similar to #40142, so a future sqlglot upgrade cannot break it silently. Since the reported case is Druid, that PR could close this issue, with the Postgres gap left to sqlglot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org