[
https://issues.apache.org/jira/browse/DRILL-7989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17403732#comment-17403732
]
ASF GitHub Bot commented on DRILL-7989:
---------------------------------------
luocooong commented on pull request #2299:
URL: https://github.com/apache/drill/pull/2299#issuecomment-904520267
@paul-rogers Thanks for the review. I think you said number is the
`Canonical Format`? such as
```json
{"$date":{"$numberLong":"1565546054692"}}
```
I have tracked the mongo reader code, then found the mongo driver only uses
the `Relaxed Format`.
```java
// org.apache.drill.exec.store.mongo.MongoRecordReader
String doc = cursor.next().toJson();
jsonReader.setSource(doc.getBytes(Charsets.UTF_8));
// com.mongodb.internal.connection.ByteBufBsonDocument
public String toJson() {
return
toJson(JsonWriterSettings.builder().outputMode(JsonMode.RELAXED).build());
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> Use the UTC formatter in the JSON reader
> ----------------------------------------
>
> Key: DRILL-7989
> URL: https://issues.apache.org/jira/browse/DRILL-7989
> Project: Apache Drill
> Issue Type: Improvement
> Reporter: Cong Luo
> Assignee: Cong Luo
> Priority: Major
> Fix For: 1.20.0
>
>
> MongoDB use the UTC format to specify the date value by default. But the JSON
> reader (old version) use the fixed date formatter :
> "yyyy-MM-dd'T'HH:mm:ss.SSSXX". Need to change to the
> "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" format.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)