Could the extra bytes coming from from_unixtime hive UDF cause the
conversion issue?
create table t_timestamp as
select TO_TIMESTAMP(unix_timestamp()) as ts from `sys`.`version`;
create table t_timestamp2 as
select from_unixtime(unix_timestamp()) as ts from `sys`.`version`;
# parquet-schema t_timestamp/0_0_0.parquet
message root {
required int64 ts (TIMESTAMP);
}
parquet-schema t_timestamp2/0_0_0.parquet
message root {
optional binary ts;
}
> select convert_from(ts,'UTF8') from dfs.tmp.t_timestamp2;
+-------------------------------------------+
| EXPR$0 |
+-------------------------------------------+
| ��2015-05-29 20:51:18 |
+-------------------------------------------+
1 row selected (0.084 seconds)
Thanks,
Hao
On Fri, May 29, 2015 at 1:46 PM, Jason Altekruse <[email protected]>
wrote:
> Tried taking a look at the function to see what the issue was,
> from_unixtime is actually a Hive UDF that is just on the classpath and
> available by default in Drill. It does look like Andries said that it is
> returning var16char, which might be a bug. The fact that it is trying to
> cast to bigInt despite it not appearing in the query seems to be an attempt
> to use an intermediate implicit cast that cannot actually be executed.
>