You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Yukihiro Okada (Jira)" <ji...@apache.org> on 2019/08/28 14:53:00 UTC

[jira] [Commented] (ORC-455) Fail to convert output of data

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

Yukihiro Okada commented on ORC-455:
------------------------------------

Hi [~owen.omalley], 

I sent a PR. Could you please take a look if you get a chance?

> Fail to convert output of data
> ------------------------------
>
>                 Key: ORC-455
>                 URL: https://issues.apache.org/jira/browse/ORC-455
>             Project: ORC
>          Issue Type: Bug
>            Reporter: Tomas Zulberti
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I am using orc-tools on JAR to create an ORC based on a JSON file, and the content is as follows:
>  
> {code:json}
> {"created":"2019-01-01 16:00:00"}
> {code}
>  
> And I use the following command to convert it to json:
> {code:bash}
> java -jar orc-tools-1.5.4-uber.jar convert --schema "struct<created:timestamp>" --output 6.orc 123.json
> {code}
> and that works ok. So I print the data into JSON again and the ouput is as follows:
> {code:json}
> {"created":"2019-01-01 16:00:00.0"}
> {code}
> But when I try to convert the output into ORC again, it raises the following error:
> {code}
> Exception in thread "main" org.threeten.bp.format.DateTimeParseException: Text '2019-01-01 16:00:00.0' could not be parsed, unparsed text found at index 19
> 	at org.threeten.bp.format.DateTimeFormatter.parseToBuilder(DateTimeFormatter.java:1590)
> 	at org.threeten.bp.format.DateTimeFormatter.parseBest(DateTimeFormatter.java:1536)
> 	at org.apache.orc.tools.convert.JsonReader$TimestampColumnConverter.convert(JsonReader.java:145)
> 	at org.apache.orc.tools.convert.JsonReader.nextBatch(JsonReader.java:295)
> 	at org.apache.orc.tools.convert.ConvertTool.run(ConvertTool.java:204)
> 	at org.apache.orc.tools.convert.ConvertTool.main(ConvertTool.java:165)
> 	at org.apache.orc.tools.Driver.main(Driver.java:113)
> {code}
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)