Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/72.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.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
配置单元的SQL查询失败_Sql_Hadoop_Hive_Hiveql - Fatal编程技术网

配置单元的SQL查询失败

配置单元的SQL查询失败,sql,hadoop,hive,hiveql,Sql,Hadoop,Hive,Hiveql,我有以下查询,当我尝试在配置单元中运行它时失败。有人能帮我重建一下吗?谢谢大家! select topic, partition_c, untilOffset from playground.kafka_offset where group_c = 'consumer-group-3' and commitTime = ( select max(commitTime) from playground.kafka_offset where group_c = 'con

我有以下查询,当我尝试在配置单元中运行它时失败。有人能帮我重建一下吗?谢谢大家!

select topic, partition_c, untilOffset from playground.kafka_offset
where group_c = 'consumer-group-3' 
and commitTime = ( 
    select max(commitTime) 
    from playground.kafka_offset
    where group_c = 'consumer-group-3' 
使用窗口功能:

select topic, partition_c, untilOffset
from (select ko.*,
             max(commitTime) over (partition by group_c) as max_commitTime
      from playground.kafka_offset ko
      where group_c = 'consumer-group-3' 
     ) ko
where commitTime = max_commitTime;

它不识别第2行中的
ko.*
,但是如果我使用
*
而不是
ko.*
。成功了。你认为这和我要求的工作方式一样吗?谢谢大家!@镇边。这应该完全相同。