You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Sergey Shelukhin (JIRA)" <ji...@apache.org> on 2013/10/30 01:41:25 UTC

[jira] [Commented] (HIVE-5679) add date support to metastore JDO/SQL

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

Sergey Shelukhin commented on HIVE-5679:
----------------------------------------

discussed a little bit here... it looks like support will have to be added to Filter.g.
I had an idea to change the code that converts hive expression to filter-g-expression in metastore to bypass the string stage and just go directly from one tree to another; that way noone would need to bother with Filter.g for new features. But that would mean this feature (and others on top) won't work for getPartitionsByFilter, so not for HCat or Pig or whoever uses that one.
So filter.g will have support for "date 'foo'" and cast syntax.
>From that, or by looking at column type in case of a string literal (the same way hive parser does), Metastore would figure out what compares are to be done by date. Both mysql and postgres support "date 'string'" syntax, so that can be used. But, given how we store dates in the table, we can just use string compares on metastore side. It will also make it usable by JDO, otherwise JDO pushdown cannot be added. That way the only problem is to make sure the date actually gets to metastore. We might not even need to validate it because if it's an invalid literal parser would catch it.



> add date support to metastore JDO/SQL
> -------------------------------------
>
>                 Key: HIVE-5679
>                 URL: https://issues.apache.org/jira/browse/HIVE-5679
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Sergey Shelukhin
>            Assignee: Sergey Shelukhin
>
> Metastore supports strings and integral types in filters.
> It could also support dates.



--
This message was sent by Atlassian JIRA
(v6.1#6144)