Hey Calcite Devs, I'm working on CALCITE-6220 <https://issues.apache.org/jira/browse/CALCITE-6220> and the summary is that we should unparse MIN/MAX differently for Postgres/Redshift depending on its operand type (if the type is BOOLEAN, it should be rewritten as BOOL_AND/OR).
This problem seems simple enough, but I've been having trouble deriving the operand type during unparsing, which has me wondering whether there's a better place for this translation to occur. My second thought was that this could occur in StandardConvertletTable but this does not account for the case where the incoming dialect is NOT Redshift/Postgres (but the target dialect is.) With that being said, my question is: where should this translation occur (a.k.a. where can I properly access the operand type in order to decide what the call should be unparsed as)? Thanks as always, Tanner