Java protobuf event sourced entity view query to return true or false

I’m getting below only when I use Case inside SELECT statement, requirement is return true incase of atleast 1 record returned by select else false in case of no record, could you please check and suggest?

Expected: from\n\nTo fix this issue, correct the query:\nSELECT CASE WHEN COUNT(*) >= 1 THEN true ELSE false END AS result FROM connection JOIN borrower ON borrower.connection_id = connection.connection_id JOIN guarantee ON guarantee.connection_id = connection.connection_id WHERE connection.connection_id = :connection_id AND :party_id = ANY(connection.member.member_type) AND :party_id = ANY(borrower.borrowers.party_id) AND :party_id = ANY(guarantee.guarantors.party_id) \n ^\n\n\nAt ui_view/view/ui_view.proto:20:1:\nservice ActiveCustomerView {\n option (kalix.codegen) = {\n view: {}\n };\n option (kalix.service).acl.allow = {principal: ALL};\n",“context”:“default”,“severity”:“ERROR”}

Note: enabled Advanced view feature

Hi deepak,

The “CASE” SQL feature is not supported. In that case, I think you can return the total count and turn in boolean outside of the query.

Note that Kalix views have its own subset of SQL and the SQL features supported are all listed in the docs here: Implementing Views in Java or Scala :: Kalix Documentation .