You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Nicolas Paris <ni...@riseup.net> on 2020/01/22 12:51:17 UTC
UDF timestamp columns
Hi
I cannot find the way to implement hive UDF dealing with timestamp type.
I tried both java.sql.Timestamp and import org.apache.hadoop.hive.common.type.Timestamp
without success
Is there any guidance ?
thanks
--
nicolas
Re: UDF timestamp columns
Posted by Nicolas Paris <ni...@riseup.net>.
Thanks Shown
Finally I got it working with java.sql.Timestamp
Indeed the version of hive is important. However I am using hive UDF
with apache spark. Paradoxally, spark-sql only handle hive udf. It does
not handle spark udf (they only apply in spark - not spark-sql)
On Wed, Jan 22, 2020 at 01:34:51PM +0000, Shawn Weeks wrote:
> Depending on what version of Hive you are looking for TimestampWritable or one of it's related classes.
>
> Thanks
> Shawn
>
> On 1/22/20, 6:51 AM, "Nicolas Paris" <ni...@riseup.net> wrote:
>
> Hi
>
> I cannot find the way to implement hive UDF dealing with timestamp type.
> I tried both java.sql.Timestamp and import org.apache.hadoop.hive.common.type.Timestamp
> without success
>
> Is there any guidance ?
>
>
> thanks
> --
> nicolas
>
>
--
nicolas
Re: UDF timestamp columns
Posted by Shawn Weeks <sw...@weeksconsulting.us>.
Depending on what version of Hive you are looking for TimestampWritable or one of it's related classes.
Thanks
Shawn
On 1/22/20, 6:51 AM, "Nicolas Paris" <ni...@riseup.net> wrote:
Hi
I cannot find the way to implement hive UDF dealing with timestamp type.
I tried both java.sql.Timestamp and import org.apache.hadoop.hive.common.type.Timestamp
without success
Is there any guidance ?
thanks
--
nicolas