当前位置:网站首页>spark udf 接受并处理 null值.
spark udf 接受并处理 null值.
2022-07-30 09:29:00 【健忘主义】
难点
spark中处理string列的null方便,但是处理int double之类的就很不方便.
你可能会说 我用 Option[Int] 不就行了么,并不行,udf不支持这个.
你会说我用Any接受,然后判断是否为null或者Int,然而还是不行.
下面给大家一个我的解决方法:

-------------------------
// _ooOoo_
// o8888888o
// 88" . "88
// (| -_- |)
// O\ = /O
// ____/`---'\____
// . ' \\| |// `.
// / \\||| : |||// \
// / _||||| -:- |||||- \
// | | \\\ - /// | |
// | \_| ''\---/'' | |
// \ .-\__ `-` ___/-. /
// ___`. .' /--.--\ `. . __
// 边栏推荐
- 新一代开源免费的终端工具,太酷了
- Re15: Read the paper LEVEN: A Large-Scale Chinese Legal Event Detection Dataset
- Domino服务器SSL证书安装指南
- EViews 12.0 software installation package download and installation tutorial
- 软考 系统架构设计师 简明教程 | 系统运行与软件维护
- By building a sequence table - teach you to calculate time complexity and space complexity (including recursion)
- 梅科尔工作室-看鸿蒙设备开发实战笔记四——内核开发
- Re20:读论文 What About the Precedent: An Information-Theoretic Analysis of Common Law
- 图像分析:投影曲线的波峰查找
- leetcode 剑指 Offer 57. 和为s的两个数字
猜你喜欢
随机推荐
CSDN21天学习挑战赛
Test automation selenium (a)
Re15: Read the paper LEVEN: A Large-Scale Chinese Legal Event Detection Dataset
echart图表清空上一次数据
debian10 install djando
ESP32 入门篇(一)使用 VS Code 进行开发环境安装
Container Technology - A Simple Understanding of Kubernetes Objects
快解析结合泛微OA
606. 根据二叉树创建字符串(视频讲解!!!)
这种叫什么手法
大数据产品:标签体系0-1搭建实践
JCL learning
nacos实战项目中的配置
水电表预付费系统
快解析结合友加畅捷通t1飞跃版
leetcode 剑指 Offer 22. 链表中倒数第k个节点
国外资源加速下载器,代码全部开源
The creation of a large root heap (video explanation)
Multi-threading scheme to ensure that a single thread opens a transaction and takes effect
pnpm简介









