FAQ
Is there any 'Server's time zone' implementation inside Hive? For proper implementation of TIMESTAMP data type, this is necessay to translate from stored string type. I am focusing on MySQL 6.0 (with limited properties) for TIMESTAMP.

http://dev.mysql.com/doc/refman/6.0/en/timestamp.html

Thanks,
Shyam

Search Discussions

  • Zheng Shao at Feb 12, 2009 at 10:32 pm
    Not yet. I think JVM take the environment variable TZ for that purpose for
    all java-related functions.

    In build-common.xml you should find the following:
    <env key="TZ" value="US/Pacific"/>

    This makes sure all current UDFs related to time/date are using the
    US/Pacific time zone. (Note: all these UDFs are operating on String and
    Integer types right now)

    Zheng
    On Thu, Feb 12, 2009 at 2:21 PM, Shyam Sarkar wrote:

    Is there any 'Server's time zone' implementation inside Hive? For proper
    implementation of TIMESTAMP data type, this is necessay to translate from
    stored string type. I am focusing on MySQL 6.0 (with limited properties) for
    TIMESTAMP.

    http://dev.mysql.com/doc/refman/6.0/en/timestamp.html

    Thanks,
    Shyam



    --
    Yours,
    Zheng
  • Shyam Sarkar at Feb 12, 2009 at 11:01 pm
    So eventually UDFs need to be modified to operate on TIMESTAMP data type !

    Can we partition a table based on TIMESTAMP ? We should because it is really important for users in many cases.

    Shyam



    --- On Thu, 2/12/09, Zheng Shao wrote:
    From: Zheng Shao <zshao9@gmail.com>
    Subject: Re: Server time zone !
    To: hive-dev@hadoop.apache.org, shyam_sarkar@yahoo.com
    Date: Thursday, February 12, 2009, 2:31 PM
    Not yet. I think JVM take the environment variable TZ for
    that purpose for
    all java-related functions.

    In build-common.xml you should find the following:
    <env key="TZ"
    value="US/Pacific"/>

    This makes sure all current UDFs related to time/date are
    using the
    US/Pacific time zone. (Note: all these UDFs are operating
    on String and
    Integer types right now)

    Zheng

    On Thu, Feb 12, 2009 at 2:21 PM, Shyam Sarkar
    wrote:
    Is there any 'Server's time zone'
    implementation inside Hive? For proper
    implementation of TIMESTAMP data type, this is
    necessay to translate from
    stored string type. I am focusing on MySQL 6.0 (with
    limited properties) for
    TIMESTAMP.

    http://dev.mysql.com/doc/refman/6.0/en/timestamp.html

    Thanks,
    Shyam



    --
    Yours,
    Zheng
  • Zheng Shao at Feb 12, 2009 at 11:07 pm
    Yeah that's the eventually goal.

    Currently the user has to manually convert the TIMESTAMP to String and
    partition on String.
    Since we do NOT allow range partitioning, this should provide exactly the
    same semantics.
    The only thing is that user needs to convert TIMESTAMP to STRING (and back
    when needed) by himself for now.


    Zheng
    On Thu, Feb 12, 2009 at 3:00 PM, Shyam Sarkar wrote:

    So eventually UDFs need to be modified to operate on TIMESTAMP data type !

    Can we partition a table based on TIMESTAMP ? We should because it is
    really important for users in many cases.

    Shyam



    --- On Thu, 2/12/09, Zheng Shao wrote:
    From: Zheng Shao <zshao9@gmail.com>
    Subject: Re: Server time zone !
    To: hive-dev@hadoop.apache.org, shyam_sarkar@yahoo.com
    Date: Thursday, February 12, 2009, 2:31 PM
    Not yet. I think JVM take the environment variable TZ for
    that purpose for
    all java-related functions.

    In build-common.xml you should find the following:
    <env key="TZ"
    value="US/Pacific"/>

    This makes sure all current UDFs related to time/date are
    using the
    US/Pacific time zone. (Note: all these UDFs are operating
    on String and
    Integer types right now)

    Zheng

    On Thu, Feb 12, 2009 at 2:21 PM, Shyam Sarkar
    wrote:
    Is there any 'Server's time zone'
    implementation inside Hive? For proper
    implementation of TIMESTAMP data type, this is
    necessay to translate from
    stored string type. I am focusing on MySQL 6.0 (with
    limited properties) for
    TIMESTAMP.

    http://dev.mysql.com/doc/refman/6.0/en/timestamp.html

    Thanks,
    Shyam



    --
    Yours,
    Zheng


    --
    Yours,
    Zheng
  • Ashish Thusoo at Feb 12, 2009 at 11:31 pm
    You could just use the

    java.util.TimeZone

    to get the current timezone.

    Ashish

    -----Original Message-----
    From: Zheng Shao
    Sent: Thursday, February 12, 2009 2:31 PM
    To: hive-dev@hadoop.apache.org; shyam_sarkar@yahoo.com
    Subject: Re: Server time zone !

    Not yet. I think JVM take the environment variable TZ for that purpose for all java-related functions.

    In build-common.xml you should find the following:
    <env key="TZ" value="US/Pacific"/>

    This makes sure all current UDFs related to time/date are using the US/Pacific time zone. (Note: all these UDFs are operating on String and Integer types right now)

    Zheng
    On Thu, Feb 12, 2009 at 2:21 PM, Shyam Sarkar wrote:

    Is there any 'Server's time zone' implementation inside Hive? For
    proper implementation of TIMESTAMP data type, this is necessay to
    translate from stored string type. I am focusing on MySQL 6.0 (with
    limited properties) for TIMESTAMP.

    http://dev.mysql.com/doc/refman/6.0/en/timestamp.html

    Thanks,
    Shyam



    --
    Yours,
    Zheng

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshive, hadoop
postedFeb 12, '09 at 10:22p
activeFeb 12, '09 at 11:31p
posts5
users3
websitehive.apache.org

People

Translate

site design / logo © 2021 Grokbase