91

scala模式匹配的一个问题 | 一根笨茄子

 6 years ago
source link: http://blog.guoyb.com/2017/12/09/scala-match/?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
最近开始用scala做一些工作。 scala和java可以说同源同种,而我上一次写java程序可能要追溯到快十年前了。平常习惯使用弱类型语言,突然间切到scala,还有点不太适应。最近碰到的这个小问题,就耗费掉我不少时间。 大概场景是有两份数据left和right,需要对他们做一次全连接(fullOuterJoin),然后对于得到的结果,优先选择left中的数据,left中的数据不存在

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK