如何在关键的 gemfire 查询中编写像 sql 这样的 case 语句

how to write a case statement like sql in pivotal gemfire query

示例 sql 查询:

select name,  
lastname,  
city, 
case when city='Mumbai' then '01' else '02' end as Code 
from products

如何使用 case 语句在 pivotal gemfire 中编写上述查询?

目前在使用本机 OQL 时不支持此功能,您需要使用其他方法实现用例,例如在返回对象之前直接在服务器端执行过滤结果的函数。有关此的更多详细信息,请参阅 Function Execution

也就是说,已经为该功能创建了改进请求,您可以通过将自己添加为观察者来跟踪进度 GEODE-4040

希望这对您有所帮助。 干杯。