当前位置:网站首页>spark udf accepts and handles null values.
spark udf accepts and handles null values.
2022-07-30 10:15:00 【forgetfulness】
Difficulty
It is convenient to deal with null of string column in spark, but it is very inconvenient to deal with int double and so on.
You may say that I can use Option[Int], but no, udf does not support this.
You will say that I accept it with Any, and then judge whether it is null or Int, but it still doesn't work.
Here's my solution:

-------------------------
// _ooOoo_//o8888888o// 88" . "88// (| -_- |)// O\ = /O// ____/`---'\____// . ' \\| |// `.// / \\||| : |||// \// / _||||| -:- |||||- \// | | \\\ - /// | |// | \_| ''\---/'' | |// \ .-\__ `-` ___/-. /// ___`. .' /--.--\ `. . __// 边栏推荐
- Multi-threading scheme to ensure that a single thread opens a transaction and takes effect
- Baidu promotion assistant encounters duplicate keywords, verification errors, how to delete redundant ones with one click
- 大数据产品:标签体系0-1搭建实践
- shell script
- 北京突然宣布,元宇宙重大消息
- 【HMS core】【Analytics Kit】【FAQ】如何解决华为分析付费分析中付款金额显示为0的问题?
- 分页 paging
- EViews 12.0软件安装包下载及安装教程
- [Deep Learning] (Problem Record)
- Linear Regression - Small Batch Stochastic Gradient Descent - kubernetes的一些命令
猜你喜欢

(C language) file operation

学习笔记11--局部轨迹直接构造法

一个近乎完美的 Unity 全平台热更方案

New in GNOME: Warn users when Secure Boot is disabled

快解析结合泛微OA

Quick Start Tutorial for flyway

leetcode 剑指 Offer 22. 链表中倒数第k个节点

EViews 12.0 software installation package download and installation tutorial

Nacos configuration in the project of battle

flyway的快速入门教程
随机推荐
mysql安装教程【安装版】
(***Key points***) Flink common memory problems and tuning guide (1)
学习笔记10--局部轨迹生成主要方法
Day113.尚医通:微信登录二维码、登录回调接口
(***重点***)Flink常见内存问题及调优指南(一)
ESP32 入门篇(一)使用 VS Code 进行开发环境安装
MySQL | Subqueries
Re17:读论文 Challenges for Information Extraction from Dialogue in Criminal Law
leetcode 剑指 Offer 52. 两个链表的第一个公共节点
Basic operations of sequence table in C language
实战演练 | 在 MySQL 中计算每日平均日期或时间间隔
shell脚本
Re16: Read the paper ILDC for CJPE: Indian Legal Documents Corpus for Court Judgment Prediction and Explanation
Re18:读论文 GCI Everything Has a Cause: Leveraging Causal Inference in Legal Text Analysis
快解析结合友加畅捷通t1飞跃版
大根堆的创建(视频讲解)
PyQt5-绘制不同类型的直线
(BUG记录)No module named PIL
PyQt5 - draw text on window
Matplotlib--plot markers