当前位置:网站首页>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// ____/`---'\____// . ' \\| |// `.// / \\||| : |||// \// / _||||| -:- |||||- \// | | \\\ - /// | |// | \_| ''\---/'' | |// \ .-\__ `-` ___/-. /// ___`. .' /--.--\ `. . __// 边栏推荐
猜你喜欢

死锁的理解

PyQt5-在窗口上绘制文本

BERT pre-training model series summary

梅科尔工作室-看鸿蒙设备开发实战笔记六—无线联网开发

flowable workflow all business concepts

BERT预训练模型系列总结

A new generation of free open source terminal tool, so cool

Flink_CDC搭建及简单使用

Meikle Studio - see the actual combat notes of Hongmeng device development 4 - kernel development

Study Notes 11--Direct Construction of Local Trajectories
随机推荐
Redis Desktop Manager 2022.4.2 发布
flowable工作流所有业务概念
Re20:读论文 What About the Precedent: An Information-Theoretic Analysis of Common Law
Soft test system architects introductory tutorial | system operation and software maintenance
Re15:读论文 LEVEN: A Large-Scale Chinese Legal Event Detection Dataset
快解析结合象过河erp
Always remember: one day you will emerge from the chrysalis
New in GNOME: Warn users when Secure Boot is disabled
By building a sequence table - teach you to calculate time complexity and space complexity (including recursion)
idea2021+Activiti [the most complete note one (basic use)]
Container Technology - A Simple Understanding of Kubernetes Objects
OC-手动引用计数内存管理
idea2021+Activiti【最完整笔记一(基础使用)】
Meikle Studio - see the actual combat notes of Hongmeng device development 4 - kernel development
论文阅读:SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
快解析结合友加畅捷通t1飞跃版
Flask之路由(app.route)详解
(C language) file operation
4、yolov5-6.0 ERROR: AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘ 解决方案
105. 从前序与中序遍历序列构造二叉树(视频讲解!!)