Hello all,
I am trying to check age in hive.
select * from tbl_name where datediff(date,dob)/365 = 18;
Is it right to check date condition in hive?
Or do I need to do something else.
Pls suggest me as soon as possible
--
Thanks and Regards,
Bhavesh Shah
that should work provided your columns are in '-mm-dd' format and you
are ok to leave out leap years :)
also its a good idea to have all the mathematical operations in a bracketed
manner so u can have it like where round(datediff(date,dob)/365) =18
On Mon, Apr 2, 2012 at 1:04 PM, Bhavesh
From what I see, You are using complex data types within Array type. It is
not possible. ARRAY is like a LIST which supports only one type.
For your case try something with STRUCT may be that suits your use-case
better.
Read this link -
1. recent users of table,
2. top users of table,
Hive metastore has audit support (HIVE-1948). While what Edward suggests
will be accurate, audit log might give you a superset of that, it will
also include desc table requests.
Thiruvel
On 3/31/12 8:39 PM, Edward Capriolo
Yes. This has bitten me before as well. Hive-exec jar builds in some
things from commons lang and commons util. They are needed by
hive-exec jar itself so getting them from distributed cache/auxjars
does not work well. I think the solution is we should probably
repackage commons util into
I've tried to collect statistics on an existing table in hive using the
commands mentioned in this wiki page -
https://cwiki.apache.org/confluence/display/Hive/StatsDev
ANALYZE TABLE [TABLENAME] PARTITION(parcol1=..., partcol2=) COMPUTE
STATISTICS
But when I do a DESCRIBE EXTENDED
HI Edward,
Thanks for the reply. Please find the created JIRA at [1]. However for
currently for getting this working would moving these classes to a separate
package structure work? I am willing to patch Hive sources to get this
working if it comes to that. How did you get around the problems you
I 'fixed' it by downgrading my common-util to the same version as hive
so the signatures would not conflict.
Edward
On Mon, Apr 2, 2012 at 12:18 PM, buddhika chamith
chamibuddh...@gmail.com wrote:
HI Edward,
Thanks for the reply. Please find the created JIRA at [1]. However for
currently for