为什么直接 run sql 可以,但是用元编程的写法就不行

正确:

select count(*) from table where d == 2023.10.10

报错:

exec(<select count(*) from table where d == 2023.10.10>)
Syntax Error: [line #1] FROM clause expected

脚本:

snap = loadTable("dfs://China_Market_HF", `Market_Snapshot)
select count(*) from snap where Date = 2015.01.15
exec(<select count(*) from snap where Date = 2015.01.15>)
请先 登录 后评论

1 个回答

wale

不是用exec(),是用eval()

eval(<select count(*) from table where d == 2023.10.10>)
请先 登录 后评论