# hive-udf **Repository Path**: fly_xiang/hive-udf ## Basic Information - **Project Name**: hive-udf - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-09-20 - **Last Updated**: 2020-12-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README java code for geohashes ======================= Useage ------------------- add jar file:///home/y/var/spark/zhaoxiang/lib/hive-udf.jar; CREATE TEMPORARY FUNCTION regeo AS 'com.yc.geo.geohash.udf.ReGeo'; CREATE TEMPORARY FUNCTION regeo_moji AS 'com.yc.geo.geohash.udf.ReGeoForMoJi'; *regeo(start_latitude,start_longitude)* *regeo_moji(start_latitude, start_longitude)* select /*+ MAPJOIN(b) */ service_order_id,city, expect_start_latitude, expect_start_longitude,regeo_moji(expect_start_latitude, expect_start_longitude) as start_district , b.district , b.weather_detail from yc_ods.ods_service_order a left join yc_tmp.tmp_weather b ON b.dt=20161227 and regeo_moji(expect_start_latitude, expect_start_longitude) = b.district where a.dt=20161227 limit 20;