-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Closed
Copy link
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.severity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
explain
select a from (
select JSON_OBJECT('number', `temp1`.`number`, 'name', `temp1`.`name`) 'a' from
(
select 1 as number, 'name-1' as name union
(select 2, 'name-2' ) union
(select 3, 'name-3' ) union
(select 4, 'name-4' ) union
(select 5, 'name-5' ) union
(select 6, 'name-2' )
) temp1
) temp
where a ->> '$.number' = 1
执行计划可以执行,但是执行会报错。Invalid JSON text: The document root must not be followed by other values
2. What did you expect to see? (Required)
执行结果是:
{"name": "name-1", "number": 1}
3. What did you see instead (Required)
Invalid JSON text: The document root must not be followed by other values
4. What is your TiDB version? (Required)
5.7.25-TiDB-v6.2.0
Metadata
Metadata
Assignees
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.severity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.