metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kaspersorensen <...@git.apache.org>
Subject [GitHub] metamodel pull request: METAMODEL-172: Adding Date parsing to ES m...
Date Mon, 24 Aug 2015 08:54:08 GMT
Github user kaspersorensen commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/43#discussion_r37730850
  
    --- Diff: elasticsearch/src/main/java/org/apache/metamodel/elasticsearch/ElasticSearchUtils.java
---
    @@ -44,8 +47,17 @@ public static Row createRow(Map<String, Object> sourceMap, String
documentId, Da
                     values[i] = documentId;
                 } else {
                     Object value = sourceMap.get(column.getName());
    -                
    -                values[i] = value;
    +
    +                if (column.getType() == ColumnType.DATE) {
    +                    Date valueToDate = TimeComparator.toDate(value);
    --- End diff --
    
    Maybe it's better that we put in the ES module the time format that ES uses. I guess the
TimeComparator is a bit more general purpose while I imagine (?) that ES is always using one
specific date pattern.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message