本教程还展示如何使用标量函数从date列计算和提取信息,例如星期几和月份。
This tutorial also shows how to use scalar functions to calculate and extract date information, such as day of week and month name, from date columns.
下面的代码并没有什么特别之处, 只是我们要循环遍历月份名称,而不是只向构造函数传递一个 Map 。
There's nothing special in the following code, just that we're looping through the month names, instead of just passing in a Map to the constructor.
函数的作用是:返回月份的名字。
应用推荐