deftest_func(compute):
result = compute(1,2)# compute是函数print(type(compute))# print(result)return result
defcompute(x, y):return x + y
result = test_func(compute)print(result)
lambda匿名函数:只可临时使用一次
lambda 传入参数: 函数体(一行代码!!)
deftest_func(compute):
result = compute(1,2)print("result=", result)
test_func(lambda x, y: x + y)
需求:按照项目名,以逗号合并参与人 presto
select item_name,array_join(array_agg(name),,) as group_name
from test.test_04
group by item_name
order by item_name hive
select item_name,concat_ws(,,collect_set(name)) as group_name
from tes…