简体   繁体   中英

HIVE table - Get records which are closest to a given numeric value

From a hive table, I want records which are closest to a given value of each of the columns. Eg The table has columns - total_score, avg_score, etc. I want to get records which have total_score and avg_score close or equal to "a given value".

Note - Table has approx. 183 million rows and I want 1,50,000 records which are closest/equal to the given value of each of the columns.

Please help me with the process of doing it.

一般概念必须是最高x,由参数值和列表中的值之差的绝对值排序。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM