摘要: 核心代码: object TransformTest { def main(args: Array[String]): Unit = { val env = StreamExecutionEnvironment.getExecutionEnvironment env.setParallelism(1 阅读全文
posted @ 2020-04-19 23:34 地中有山 阅读(4264) 评论(0) 推荐(1) 编辑
摘要: 1.无参方法,加不加都可以执行。因为都可以执行,所以遇到不想它执行时,比如函数作为参数传递时,可以加上下划线 _ object FuncProgrammingDemo { def main(args: Array[String]): Unit = { myPrint //hello myPrint( 阅读全文
posted @ 2020-04-19 22:10 地中有山 阅读(822) 评论(0) 推荐(0) 编辑
摘要: 表数据如下 select * from score; score.name score.subject score.score r1 r2 r3 大海 语文 94 1 1 1 大海 英语 84 2 2 2 大海 数学 56 3 3 3 婷婷 数学 85 1 1 1 婷婷 英语 78 2 2 2 婷婷 阅读全文
posted @ 2020-04-19 20:38 地中有山 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 表数据如下 select * from business; business.name business.orderdate business.cost jack 2017-01-01 10 tony 2017-01-02 15 jack 2017-02-03 23 tony 2017-01-04 阅读全文
posted @ 2020-04-19 19:24 地中有山 阅读(140) 评论(0) 推荐(0) 编辑
摘要: object MapDemo { def main(args: Array[String]): Unit = { //构建 val map = mutable.Map[String, Int]("abc" -> 123, ("xyz", 789)) //取值 if (map.contains("ab 阅读全文
posted @ 2020-04-19 14:50 地中有山 阅读(2628) 评论(0) 推荐(0) 编辑