大数据之spark_spark sql的自定义函数_spark 有这样的函数么ip_to_location-CSDN博客

网站介绍:文章浏览阅读631次。用户自定义函数UDF:输入一行返回一行UDTF:输入一行返回多行,类似于flatmapUDAF:输入多行返回一行,类似于聚合函数用户自定义UDF函数UDF案例11.在sql语句中根据ip查询省市地址package com.doit.spark.day11import com.doit.spark.day11.Utils.ip2Longimport org.apache.spark.broadcast.Broadcastimport org.apache.spark.rdd.RDDim_spark 有这样的函数么ip_to_location