Case When in Flink Table API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Case When in Flink Table API

Soheil Pourbafrani
How can I use the correct way of Case When this example:

myTlb.select(
"o_orderdate.substring(0,4) as o_year,
 volume, 
(when(n_name.like('%BRAZIL%'),volume).else(0)) as case_volume"
)

Flink errors on the line 
(when(n_name.like('%BRAZIL%'),volume).else(0)) as case_volume"