HiveException: Stateful expressions cannot be used inside of CASE

2014-09-24 Thread Dan Fan
Hi Hive Users: I have a hive generic hive udf which is called protect_column. The udf works fine when I call it along. But when I run the following query: select case when id = 5 then protect_column(id, 'age', 12L) else id end from one_row_table ; It says Caused by: org.apache.hadoop.hive

how to convert LazyLong to Long in hive generic udf ?

2014-09-23 Thread Dan Fan
Hi Hive users: Does anyone know how to convert LazyLong to Long in hive generic udf ? Thanks Dan

Unxpected exception: Unxpected exception: org.apache.hadoop.io.LongWritable cannot be cast to java.lang.Long

2014-09-22 Thread Dan Fan
Dear hive users: Quick question about hive longwritable convert to long. I have a generic udf called protected_column, which works well as following: Select protect_column(auction_id_64, ‘auction_id_64’, vp_bitmap) from table ; And works well when I run Select * from ( select protect_column(

FAILED: ClassCastException org.apache.hadoop.io.Text cannot be cast to java.lang.String

2014-08-01 Thread Dan Fan
Hi team Quick question. I am writing a hive generic UDF. In which, I wanna have this: HashMap vpDefinition = new HashMap() ; vpDefinition.push(“auction_id”,”22”) ; The second line always give me FAILED: ClassCastException org.apache.hadoop.io.Text cannot be cast to java.lang.String When I ru

FAILED: ClassCastException org.apache.hadoop.io.Text cannot be cast to java.lang.String

2014-08-01 Thread Dan Fan
Hi team Quick question. I am writing a hive generic UDF. In which, I wanna have this: HashMap vpDefinition = new HashMap() ; vpDefinition.push(“auction_id”,”22”) ; The second line always give me FAILED: ClassCastException org.apache.hadoop.io.Text cannot be cast to java.lang.String When I ru

FAILED: ClassCastException org.apache.hadoop.io.Text cannot be cast to java.lang.String

2014-08-01 Thread Dan Fan
Hi team Quick question. I am writing a hive generic UDF. In which, I wanna have this: HashMap vpDefinition = new HashMap() ; vpDefinition.push(“auction_id”,”22”) ; The second line always give me FAILED: ClassCastException org.apache.hadoop.io.Text cannot be cast to java.lang.String When I run

Re: How can I know one table is a partitioned table in hive?

2014-07-31 Thread Dan Fan
The easiest way is to go to hive, Show create table table_name. Then you can know when the table, if the it is partitioned From: Nitin Pawar mailto:nitinpawar...@gmail.com>> Reply-To: "user@hive.apache.org" mailto:user@hive.apache.org>> Date: Thursday, July 31, 2014 a

hive udf cannot recognize generic method

2014-07-30 Thread Dan Fan
Hi there I am writing a hive UDF function. The input could be string, int, double etc. The return is based on the data type. I was trying to use the generic method, however, hive seems not recognize it. Here is the piece of code I have as example. public T evaluate(final T s, final String co