You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/02/19 20:33:00 UTC

[jira] [Commented] (DRILL-8143) Error querying json with $date field

    [ https://issues.apache.org/jira/browse/DRILL-8143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495046#comment-17495046 ] 

ASF GitHub Bot commented on DRILL-8143:
---------------------------------------

agozhiy opened a new pull request #2469:
URL: https://github.com/apache/drill/pull/2469


   # [DRILL-8143](https://issues.apache.org/jira/browse/DRILL-8143): Error querying json with $date field
   
   ## Description
   
   Drill cannot parse TZ offset in 'date' type in MongoDB extended json. The solution is to use ISO_OFFSET_DATE_TIME formatter that can handle both zero and non-zero offsets. 
   Note that it will support offsets in the following dormats:
   'Z', 'HH', 'HH:mm', but not 'HHmm' (Which is also corresponds with ISO 8601, but is not supported by any predefined formatter)
   
   ## Documentation
   
   ## Testing
   Modified unit tests and tested manally.
   


-- 
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: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Error querying json with $date field
> ------------------------------------
>
>                 Key: DRILL-8143
>                 URL: https://issues.apache.org/jira/browse/DRILL-8143
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.20.0
>            Reporter: Anton Gozhiy
>            Assignee: Anton Gozhiy
>            Priority: Major
>         Attachments: extended.json
>
>
> *Test Data:*
>  [^extended.json]  attached.
> *Query:*
> {code:sql}
>  select * from dfs.drillTestDir.`complex/drill-2879/extended.json` where name = 'd'
> {code}
> *Expected Results:*
> Query successful, no exception should be thrown.
> *Actual Result:*
> Exception happened:
> {noformat}
> UserRemoteException : 	INTERNAL_ERROR ERROR: Text '2015-03-12T21:54:31.809+0530' could not be parsed at index 23
>     
> org.apache.drill.common.exceptions.UserRemoteException: INTERNAL_ERROR ERROR: Text '2015-03-12T21:54:31.809+0530' could not be parsed at index 23
> Fragment: 0:0
> Please, refer to logs for more information.
> [Error Id: c984adbf-a455-4e0e-b3cd-b5aa7d83a765 on userf87d-pc:31010]
>   (java.time.format.DateTimeParseException) Text '2015-03-12T21:54:31.809+0530' could not be parsed at index 23
>     java.time.format.DateTimeFormatter.parseResolved0():2046
>     java.time.format.DateTimeFormatter.parse():1948
>     java.time.Instant.parse():395
>     org.apache.drill.exec.vector.complex.fn.VectorOutput$MapVectorOutput.writeTimestamp():364
>     org.apache.drill.exec.vector.complex.fn.VectorOutput.innerRun():115
>     org.apache.drill.exec.vector.complex.fn.VectorOutput$MapVectorOutput.run():308
>     org.apache.drill.exec.vector.complex.fn.JsonReader.writeMapDataIfTyped():386
>     org.apache.drill.exec.vector.complex.fn.JsonReader.writeData():262
>     org.apache.drill.exec.vector.complex.fn.JsonReader.writeDataSwitch():192
>     org.apache.drill.exec.vector.complex.fn.JsonReader.writeDocument():178
>     org.apache.drill.exec.store.easy.json.reader.BaseJsonReader.writeToVector():99
>     org.apache.drill.exec.store.easy.json.reader.BaseJsonReader.write():70
>     org.apache.drill.exec.store.easy.json.JSONRecordReader.next():234
>     org.apache.drill.exec.physical.impl.ScanBatch.internalNext():234
>     org.apache.drill.exec.physical.impl.ScanBatch.next():298
>     org.apache.drill.exec.record.AbstractRecordBatch.next():119
>     org.apache.drill.exec.record.AbstractRecordBatch.next():111
>     org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext():59
>     org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():85
>     org.apache.drill.exec.record.AbstractRecordBatch.next():170
>     org.apache.drill.exec.record.AbstractRecordBatch.next():119
>     org.apache.drill.exec.record.AbstractRecordBatch.next():111
>     org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext():59
>     org.apache.drill.exec.record.AbstractRecordBatch.next():170
>     org.apache.drill.exec.record.AbstractRecordBatch.next():119
>     org.apache.drill.exec.record.AbstractRecordBatch.next():111
>     org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext():59
>     org.apache.drill.exec.record.AbstractRecordBatch.next():170
>     org.apache.drill.exec.record.AbstractRecordBatch.next():119
>     org.apache.drill.exec.record.AbstractRecordBatch.next():111
>     org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext():59
>     org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():85
>     org.apache.drill.exec.record.AbstractRecordBatch.next():170
>     org.apache.drill.exec.record.AbstractRecordBatch.next():119
>     org.apache.drill.exec.record.AbstractRecordBatch.next():111
>     org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext():59
>     org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():85
>     org.apache.drill.exec.record.AbstractRecordBatch.next():170
>     org.apache.drill.exec.physical.impl.BaseRootExec.next():103
>     org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext():81
>     org.apache.drill.exec.physical.impl.BaseRootExec.next():93
>     org.apache.drill.exec.work.fragment.FragmentExecutor.lambda$run$0():321
>     java.security.AccessController.doPrivileged():-2
>     javax.security.auth.Subject.doAs():423
>     org.apache.hadoop.security.UserGroupInformation.doAs():1762
>     org.apache.drill.exec.work.fragment.FragmentExecutor.run():310
>     org.apache.drill.common.SelfCleaningRunnable.run():38
>     java.util.concurrent.ThreadPoolExecutor.runWorker():1128
>     java.util.concurrent.ThreadPoolExecutor$Worker.run():628
>     java.lang.Thread.run():834
> {noformat}
> *Note:* It is not reproducible in Drill 1.19.0



--
This message was sent by Atlassian Jira
(v8.20.1#820001)