Hi,
I want to implement to_json function in Impala, similar to brickhouse
to_json UDF in Hive (
https://github.com/klout/brickhouse/blob/master/src/main/java/brickhouse/udf/json/ToJsonUDF.java)
.
But when registering, I found that Impala does not support Hive GenericUDF.
Is it true?
If I implement Impala to_json UDF in C ++, can I solve the following
problems:
Example: select to_json ('uid', uid, 'action', action ... etc.) as json,
uid, action, delta from test_udf
1. The number of parameters in the to_json function is variable. Can it be
implemented in C ++?
2. When the to_json function is processed internally, can I get data types
such as `uid` fields?
Or, if I want to implement the to_json function in Impala, is there a
better idea?
best,
Pei Wang