hive round函数
时间: 2023-08-28 19:16:06 浏览: 159
hive函数1
在Hive中,round()函数用于对数字进行四舍五入操作。它有两种用法:
1. round(number):默认四舍五入到整数。例如,round(1.5)的结果是2。
2. round(number, decimal_places):将数字四舍五入到指定的小数位数。例如,round(1.455, 2)的结果是1.46,即四舍五入到百分位。
引用提供了floor()、ceil()和round()函数的用法,floor()函数向下取整,ceil()函数向上取整,而round()函数可实现四舍五入。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Hive的内置函数](https://blog.csdn.net/Mark_Frank/article/details/119925135)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [hive小数取整函数(floor函数,ceil函数,round函数)](https://blog.csdn.net/ZZQHELLO2018/article/details/120847002)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文