Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 1.0.1
-
None
-
RHEL6.2
$ rpm -qa | egrep -i "impala|cloudera|hadoop" | sort
cloudera-manager-agent-4.5.3-1.cm453.p0.340.el6.x86_64
cloudera-manager-daemons-4.5.3-1.cm453.p0.340.el6.x86_64
hadoop-0.20-mapreduce-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64
hadoop-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64
hadoop-client-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64
hadoop-hdfs-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64
hadoop-hdfs-fuse-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64
hadoop-httpfs-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64
hadoop-libhdfs-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64
hadoop-mapreduce-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64
hadoop-yarn-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64
hue-impala-2.3.0+136-1.cdh4.3.0.p0.16.el6.x86_64
impala-1.0.1-1.p0.888.el6.x86_64
impala-shell-1.0.1-1.p0.888.el6.x86_64RHEL6.2 $ rpm -qa | egrep -i "impala|cloudera|hadoop" | sort cloudera-manager-agent-4.5.3-1.cm453.p0.340.el6.x86_64 cloudera-manager-daemons-4.5.3-1.cm453.p0.340.el6.x86_64 hadoop-0.20-mapreduce-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64 hadoop-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64 hadoop-client-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64 hadoop-hdfs-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64 hadoop-hdfs-fuse-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64 hadoop-httpfs-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64 hadoop-libhdfs-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64 hadoop-mapreduce-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64 hadoop-yarn-2.0.0+1357-1.cdh4.3.0.p0.21.el6.x86_64 hue-impala-2.3.0+136-1.cdh4.3.0.p0.16.el6.x86_64 impala-1.0.1-1.p0.888.el6.x86_64 impala-shell-1.0.1-1.p0.888.el6.x86_64
Description
Impala report error when passing BIGINT to from_unixtime() which conflict with its document.
- explicite test.
$ impala-shell -q "select from_unixtime(cast(0 as bigint))"
Connected to cnbladel1n01.clusters.com:21000
Server version: impalad version 1.0.1 RELEASE (build df844fb967cec8740f08dfb8b21962bc053527ef)
Query: select from_unixtime(cast(0 as bigint))
ERROR: AnalysisException: No matching function with those arguments: from_unixtime (BIGINT)
Could not execute command: select from_unixtime(cast(0 as bigint))
- implicit test
$ impala-shell -q "select from_unixtime(`date -u -d "2038-01-19" "+%s"`);"
Connected to cnbladel1n01.clusters.com:21000
Server version: impalad version 1.0.1 RELEASE (build df844fb967cec8740f08dfb8b21962bc053527ef)
Query: select from_unixtime(2147472000)
Query finished, fetching results ...
---------------------------from_unixtime(2147472000) ---------------------------
2038-01-19 00:00:00 ---------------------------
Returned 1 row(s) in 0.26s
$ impala-shell -q "select from_unixtime(`date -u -d "2038-01-20" "+%s"`);"
Connected to cnbladel1n01.clusters.com:21000
Server version: impalad version 1.0.1 RELEASE (build df844fb967cec8740f08dfb8b21962bc053527ef)
Query: select from_unixtime(2147558400)
ERROR: AnalysisException: No matching function with those arguments: from_unixtime (BIGINT)
Could not execute command: select from_unixtime(2147558400)
- Hive works for all above test cases.
$ hive -e "select from_unixtime(cast(0 as bigint)) from tab1 limit 1;"
Logging initialized using configuration in jar:file:/usr/lib/hive/lib/hive-common-0.10.0-cdh4.3.0.jar!/hive-log4j.properties
Hive history file=/tmp/fuzhiwen/hive_job_log_c1dd5b11-4a0e-4be9-9524-e5821b5a8123_1639546170.txt
Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_201306080735_0047, Tracking URL = http://cnbladel1n02.clusters.com:50030/jobdetails.jsp?jobid=job_201306080735_0047
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_201306080735_0047
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0
2013-06-20 16:35:07,546 Stage-1 map = 0%, reduce = 0%
2013-06-20 16:35:13,600 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.9 sec
2013-06-20 16:35:14,624 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.9 sec
2013-06-20 16:35:15,636 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.9 sec
2013-06-20 16:35:16,647 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 1.9 sec
MapReduce Total cumulative CPU time: 1 seconds 900 msec
Ended Job = job_201306080735_0047
MapReduce Jobs Launched:
Job 0: Map: 1 Cumulative CPU: 1.9 sec HDFS Read: 374 HDFS Write: 20 SUCCESS
Total MapReduce CPU Time Spent: 1 seconds 900 msec
OK
1970-01-01 08:00:00
Time taken: 20.576 seconds
$ hive -e "select from_unixtime(`date -u -d "2038-01-20" "+%s"`) from tab1 limit 1;"
Logging initialized using configuration in jar:file:/usr/lib/hive/lib/hive-common-0.10.0-cdh4.3.0.jar!/hive-log4j.properties
Hive history file=/tmp/fuzhiwen/hive_job_log_26673a46-3a87-4013-8e23-2b2848750077_189113069.txt
Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_201306080735_0048, Tracking URL = http://cnbladel1n02.clusters.com:50030/jobdetails.jsp?jobid=job_201306080735_0048
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_201306080735_0048
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0
2013-06-20 16:36:04,710 Stage-1 map = 0%, reduce = 0%
2013-06-20 16:36:11,773 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.84 sec
2013-06-20 16:36:12,792 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.84 sec
2013-06-20 16:36:13,804 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.84 sec
2013-06-20 16:36:14,816 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 1.84 sec
MapReduce Total cumulative CPU time: 1 seconds 840 msec
Ended Job = job_201306080735_0048
MapReduce Jobs Launched:
Job 0: Map: 1 Cumulative CPU: 1.84 sec HDFS Read: 374 HDFS Write: 20 SUCCESS
Total MapReduce CPU Time Spent: 1 seconds 840 msec
OK
2038-01-20 08:00:00
Time taken: 20.417 seconds