You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "SHUBHAM KUMAR (Jira)" <ji...@apache.org> on 2022/08/23 23:07:00 UTC
[jira] [Commented] (DRILL-8284) Apache SQL Query failing while accessing the Json with complex data model
[ https://issues.apache.org/jira/browse/DRILL-8284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17583896#comment-17583896 ]
SHUBHAM KUMAR commented on DRILL-8284:
--------------------------------------
Json sample for case1:
{"attributes": [
{
"name": "webBrandName",
"value": {
"en-US": "Smashbox"
}
},
{
"name": "startDate",
"value": "2011-07-25T15:30:00.000Z"
}
]
}
Json sample for case2:
{"attributes": [
{
"name": "startDate",
"value": "2011-07-25T15:30:00.000Z"
},
{
"name": "hasCBD",
"value": false
}
]
}
> Apache SQL Query failing while accessing the Json with complex data model
> -------------------------------------------------------------------------
>
> Key: DRILL-8284
> URL: https://issues.apache.org/jira/browse/DRILL-8284
> Project: Apache Drill
> Issue Type: Bug
> Reporter: SHUBHAM KUMAR
> Priority: Major
>
> Apache SQL Query failing while accessing the Json with complex data model.
> Complex Json:
> Map object inside another map object then Array Object.
> Case1: When we have nested objects within array map, and map within map.
> {"attributes": [
> {
> "name": "webBrandName",
> "value": {
> "en-US": "Smashbox"
> }
> },
> {
> "name": "startDate",
> "value": "2011-07-25T15:30:00.000Z"
> }
> ]
> }
> Case2: Having array with multiple map items with diff data types. eg. String and Boolean both type.
> {"attributes": [
> {
> "name": "startDate",
> "value": "2011-07-25T15:30:00.000Z"
> },
> {
> "name": "hasCBD",
> "value": false
> }
> ]
> }
> Query:
> select flatten(attributes) as Var from dfs.`/filepath/filename.json`
>
> Error:
> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: IndexOutOfBoundsException: readerIndex: 0, writerIndex: 1764642048 (expected: 0 <= readerIndex <= writerIndex <= capacity(0)) Fragment: 0:0 Please, refer to logs for more information. [Error Id: c5a3b8fa-cad1-4c9a-8673-de5745e9170b on GGNUWT461535L.ad.infosys.com:31010]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)