Re: Flink SQL string literal does not support double quotation?

2018-11-01 Thread Xingcan Cui
Hi Henry,

In most SQL conventions, single quotes are for Strings, while double quotes are 
for identifiers.

Best,
Xingcan

> On Oct 31, 2018, at 7:53 PM, 徐涛  wrote:
> 
> Hi Experts,
>   When I am running the following SQL in FLink 1.6.2, I got 
> org.apache.calcite.sql.parser.impl.ParseException
>   
>   select 
>BUYER_ID, 
>AMOUNT, 
>concat( 
>from_unixtime(unix_timestamp(CREATE_TIME, 'EEE MMM dd 
> HH:mm:ss zzz '),'MMdd'), 
>case when 1>= 10 and 1<= 21 
>then "02" else "01” 
>end 
>) as date12 
>from 
>vip_order
> 
>   but when I use single quotes , such as  ’02’ , it does not complain 
> anything, it is a bit wired, because normally in SQL user can use double 
> quotation or single quotation equally.
>   I want to know it is a Flink limitation or a bug? If it is a 
> limitation, why?
>   Thank you.
> 
> 
> Best 
> Henry



Flink SQL string literal does not support double quotation?

2018-10-31 Thread 徐涛
Hi Experts,
When I am running the following SQL in FLink 1.6.2, I got 
org.apache.calcite.sql.parser.impl.ParseException

select 
 BUYER_ID, 
 AMOUNT, 
 concat( 
 from_unixtime(unix_timestamp(CREATE_TIME, 'EEE MMM dd 
HH:mm:ss zzz '),'MMdd'), 
 case when 1>= 10 and 1<= 21 
 then "02" else "01” 
 end 
 ) as date12 
 from 
 vip_order

but when I use single quotes , such as  ’02’ , it does not complain 
anything, it is a bit wired, because normally in SQL user can use double 
quotation or single quotation equally.
I want to know it is a Flink limitation or a bug? If it is a 
limitation, why?
Thank you.


Best 
Henry

Flink SQL string literal does not support double quotation?

2018-10-31 Thread 徐涛
Hi Experts,
When I am running the following SQL in FLink 1.6.2, I got 
org.apache.calcite.sql.parser.impl.ParseException

select 
 BUYER_ID, 
 AMOUNT, 
 concat( 
 from_unixtime(unix_timestamp(CREATE_TIME, 'EEE MMM dd 
HH:mm:ss zzz '),'MMdd'), 
 case when 1>= 10 and 1<= 21 
 then "02" else "01” 
 end 
 ) as date12 
 from 
 vip_order

but when I use single quotes , such as  ’02’ , it does not complain 
anything, it is a bit wired, because normally in SQL user can use double 
quotation or single quotation equally.
I want to know it is a Flink limitation or a bug? If it is a 
limitation, why?
Thank you.


Best 
Henry