user是关键字,需要用`user`来处理一下~

Kyle Zhang <sherlock0...@gmail.com> 于2020年10月9日周五 上午8:34写道:

> 试一试select *  from  OrderA orderA join OrderB orderB on
> orderA.user=orderB.user
>
> On Sun, Oct 4, 2020 at 5:09 PM 忝忝向仧 <153488...@qq.com> wrote:
>
> > Hi,all:
> >
> >
> > Table api的sql查询里面join的时候不能写"."么?
> > 这样写就会报错 如下
> > Exception in thread "main" org.apache.flink.table.api.SqlParserException:
> > SQL parse failed. Encountered "." at line 1, column 36.
> > Was expecting one of:
> > &nbsp; &nbsp; <EOF&gt;&nbsp;
> > &nbsp; &nbsp; "EXCEPT" ...
> > &nbsp; &nbsp; "FETCH" ...
> > &nbsp; &nbsp; "FROM" ...
> > &nbsp; &nbsp; "INTERSECT" ...
> > &nbsp; &nbsp; "LIMIT" ...
> > &nbsp; &nbsp; "OFFSET" ...
> > &nbsp; &nbsp; "ORDER" ...
> > &nbsp; &nbsp; "MINUS" ...
> > &nbsp; &nbsp; "UNION" ...
> > &nbsp; &nbsp; "," ...
> >
> >
> >
> > Table result = tEnv.sqlQuery("select *  from  OrderA join OrderB on
> > OrderA.user=OrderB.user");
>


-- 

Best,
Benchao Li

回复