hive round函数
时间: 2023-10-18 14:26:28 浏览: 106
Hive中的round函数是一个内置函数,用于将一个数值四舍五入到指定的小数位数。它可以接受一个或两个参数。如果只有一个参数,则默认将数值四舍五入到个位。如果有两个参数,则第一个参数是要进行四舍五入的数值,第二个参数是要保留的小数位数。例如,使用round(1.455, 2)会将1.455四舍五入到十分位,结果是1.46。而使用round(1.5)会将1.5四舍五入到个位,结果是2。另外,使用round(255, -1)会将255四舍五入到十位,结果是260,因为此时个位是5会进位。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [hive函数大全](https://download.csdn.net/download/qq_37812505/9976534)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [hive:函数:内置函数:round()/floor()/ceil()](https://blog.csdn.net/weixin_38750084/article/details/93491532)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文