apache / apache/gluten

[VL] get_json_object generate incorrect result

Open
#8,102 3 comments 0 reactions 1 assignee Claimed by @philo-he View on GitHub
bug triage
Dominant language
Scala
Stars
1.6k
Forks
657
Avg merge
2d 14h
Merged PRs (30d)
80

Description

### Backend

VL (Velox)

### Bug description

https://github.com/apache/incubator-gluten/pull/8099#issuecomment-2507271371
```
'$.store.book' offload to gluten
- $.store.book *** FAILED ***
Incorrect evaluation: get_json_object(
{"store":{"fruit":[{"weight":8,"type":"apple"},{"weight":9,"type":"pear"}],
"basket":[[1,2,{"b":"y","a":"x"}],[3,4],[5,6]],"book":[{"author":"Nigel Rees",
"title":"Sayings of the Century","category":"reference","price":8.95},
{"author":"Herman Melville","title":"Moby Dick","category":"fiction","price":8.99,
"isbn":"0-553-21311-3"},{"author":"J. R. R. Tolkien","title":"The Lord of the Rings",
"category":"fiction","reader":[{"age":25,"name":"bob"},{"age":26,"name":"jack"}],
"price":22.99,"isbn":"0-395-19395-8"}],"bicycle":{"price":19.95,"color":"red"}},
"email":"amy@only_for_json_udf_test.net","owner":"amy","zip code":"94025",
"fb:testid":"1234"}
, $.store.book), actual: [{"author":"Nigel Rees",
"title":"Sayings of the Century","category":"reference","price":8.95},
{"author":"Herman Melville","title":"Moby Dick","category":"fiction","price":8.99,
"isbn":"0-553-21311-3"},{"author":"J. R. R. Tolkien","title":"The Lord of the Rings",
"category":"fiction","reader":[{"age":25,"name":"bob"},{"age":26,"name":"jack"}],
"price":22.99,"isbn":"0-395-19395-8"}], expected: [{"author":"Nigel Rees","title":"Sayings of the Century","category":"reference","price":8.95},{"author":"Herman Melville","title":"Moby Dick","category":"fiction","price":8.99,"isbn":"0-553-21311-3"},{"author":"J. R. R. Tolkien","title":"The Lord of the Rings","category":"fiction","reader":[{"age":25,"name":"bob"},{"age":26,"name":"jack"}],"price":22.99,"isbn":"0-395-19395-8"}] (GlutenTestsTrait.scala:286)
'$.store.book[0]' offload to gluten
- $.store.book[0] *** FAILED ***
Incorrect evaluation: get_json_object(
{"store":{"fruit":[{"weight":8,"type":"apple"},{"weight":9,"type":"pear"}],
"basket":[[1,2,{"b":"y","a":"x"}],[3,4],[5,6]],"book":[{"author":"Nigel Rees",
"title":"Sayings of the Century","category":"reference","price":8.95},
{"author":"Herman Melville","title":"Moby Dick","category":"fiction","price":8.99,
"isbn":"0-553-21311-3"},{"author":"J. R. R. Tolkien","title":"The Lord of the Rings",
"category":"fiction","reader":[{"age":25,"name":"bob"},{"age":26,"name":"jack"}],
"price":22.99,"isbn":"0-395-19395-8"}],"bicycle":{"price":19.95,"color":"red"}},
"email":"amy@only_for_json_udf_test.net","owner":"amy","zip code":"94025",
"fb:testid":"1234"}
, $.store.book[0]), actual: {"author":"Nigel Rees",
"title":"Sayings of the Century","category":"reference","price":8.95}, expected: {"author":"Nigel Rees","title":"Sayings of the Century","category":"reference","price":8.95} (GlutenTestsTrait.scala:286)
```

### Spark version

None

### Spark configurations

_No response_

### System information

_No response_

### Relevant logs

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.