Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hive Impala查询无法检索具有NullPointerException的结果_Hive_Impala - Fatal编程技术网

Hive Impala查询无法检索具有NullPointerException的结果

Hive Impala查询无法检索具有NullPointerException的结果,hive,impala,Hive,Impala,我在hive/impala上运行了以下查询: select count(p.id) as tweet_count, p.author as author,p.profile_image_url as profile_image_url,p.screen_name as screen_name, concat_ws('/',min(p.postday),min(p.postmonth),min(p.postyear) ) as creation_date,p.message message,af.

我在hive/impala上运行了以下查询:

select count(p.id) as tweet_count, p.author as author,p.profile_image_url as profile_image_url,p.screen_name as screen_name,
concat_ws('/',min(p.postday),min(p.postmonth),min(p.postyear) ) as creation_date,p.message message,af.followerid as follower 
from post p 
inner join author_follower af on af.id like if(p.author= null, '', concat(p.author,'%'))
where p.hashtaglist like 'hashtagtobeused' 
group by author,profile_image_url,screen_name,message,follower
ORDER BY cast(min(postyear) as int),cast(min(postmonth) as int),cast(min(postday) as int),cast(min(posthour) as int) ASC;
但由于某些原因,我得到了以下错误结果

您的查询存在以下错误:


我检查了查询,但找不到问题,请任何人帮助并指导问题所在?为什么我会出现此错误而不是结果集?请仔细考虑重新格式化查询,因为在某些情况下,当SQL解析本身由于空格等简单问题而失败时,Impala会与SEGV崩溃。如果您正在运行Cloudera,您将在运行查询的节点上的
/run/Cloudera scm agent/process
中找到日志

我们已经通过对SQL格式的谨慎处理解决了这些问题(这也是一个很好的实践,因为它使查询错误更容易发现),例如

(顺便说一句,我使用dbVisualizer验证并重新格式化查询语法——这是一个值得考虑的好工具)

该消息的意思是“服务器出现故障(甚至崩溃)”——查看服务器端的Impala日志,了解原因和方式。我已经看到了守护进程由于严重的
SEGV
低级进程故障而崩溃(C++速度很快,但是内存处理的错误是无法原谅的…)
Bad status for request 3304: TGetOperationStatusResp(status=TStatus(errorCode=None, errorMessage=None, sqlState=None, infoMessages=None, statusCode=0), operationState=5, errorMessage=None, sqlState=None, errorCode=None)
SELECT
    COUNT(p.id)                                                     AS tweet_count,
    p.author                                                        AS author,
    p.profile_image_url                                             AS profile_image_url,
    p.screen_name                                                   AS screen_name,
    concat_ws('/', MIN(p.postday), MIN(p.postmonth), MIN(p.postyear) ) AS creation_date,
    p.message                                                       AS MESSAGE,
    af.followerid                                                   AS follower
FROM
    post p
INNER JOIN
    author_follower af
ON
    af.id LIKE IF(p.author = NULL, '', concat(p.author, '%'))
WHERE
    p.hashtaglist LIKE 'hashtagtobeused'
GROUP BY
    author,
    profile_image_url,
    screen_name,
    MESSAGE,
    follower
ORDER BY
    CAST(MIN(postyear) AS INT),
    CAST(MIN(postmonth) AS INT),
    CAST(MIN(postday) AS INT),
    CAST(MIN(posthour) AS INT) ASC;