如何在Hive中编写数组文字?
SELECT PERCENTILE(my_column, [0.5, 0.25, 0.50, 0.75, 0.95]) AS quantiles
FROM my_table
Run Code Online (Sandbox Code Playgroud)
返回错误
FAILED: ParseException line xx:xx cannot recognize input near '[' '0.5' ',' in select expression
Run Code Online (Sandbox Code Playgroud)
Fuz*_*ree 13
尝试使用array而不是[]
SELECT PERCENTILE(my_column, array(0.5, 0.25, 0.50, 0.75, 0.95)) AS quantiles
FROM my_table
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5496 次 |
| 最近记录: |