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

ASF GitHub Bot commented on METAMODEL-172:
------------------------------------------

Github user kaspersorensen commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/43#discussion_r37730788
  
    --- Diff: 
core/src/test/java/org/apache/metamodel/util/TimeComparatorTest.java ---
    @@ -66,6 +66,9 @@ public void testToDate() throws Exception {
                assertEquals("2000-12-31 02:30:05.100",
                                dateFormat.format(TimeComparator
                                                .toDate("2000-12-31 
02:30:05.100")));
    +
    +        assertEquals("Fri Jan 04 15:55:51 CET 2013",
    +                
TimeComparator.toDate("2013-01-04T15:55:51.217+01:00").toString());
    --- End diff --
    
    This seems to fail in Travis.


> ElasticSearch Date types should be converted properly
> -----------------------------------------------------
>
>                 Key: METAMODEL-172
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-172
>             Project: Apache MetaModel
>          Issue Type: Bug
>            Reporter: Alberto
>            Priority: Critical
>
> When working with ElasticSearch indexes that contains Date types the API is 
> returning Strings instead of proper Date object.
> We should add some logic inside the ElasticSearchUtils createRow() method to 
> convert these strings to java.Date objects. As we are not doing this 
> conversion so far the TimeComparator convertFromString method is not able to 
> parse the string value as a Date, the method returns null and then the 
> FormatHelper class is throwing an IllegalStateException.
> This is a bit tricky though because the number of date formats supported by 
> ElasticSearch is quite big  to think about creating a SimpleDateFormat to 
> support every single case: 
> https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to