As far as overriding, you can checkout what we do at Dremio:
https://github.com/dremio/dremio-oss/blob/master/sabot/kernel/src/main/java/com/dremio/exec/planner/cost/RelMdColumnUniqueness.java
https://github.com/dremio/dremio-oss/blob/master/sabot/kernel/src/main/java/com/dremio/exec/planner/cost/DremioRelMetadataHandlerProvider.java

I think what you are saying makes sense. I haven't looked closely at the
original commit, but I wonder if they meant to do something like:

if c = constant, then replace isUnique(a,b,c) with isUnique(a,b)

but they did the reverse, replacing isUnique(a,b) with isUnique(a,b,c)

On Fri, Mar 7, 2025 at 11:13 AM Ian Bertolacci
<ian.bertola...@workday.com.invalid> wrote:

> Related: I have absolutely no idea how to make a minor override to
> RelMdColumnUniqueness without modifying the class itself.
> I really don’t understand how all this  bespoke reflection works, or how
> to augment the behavior of existing handlers.
> Is there any documentation, guides, or examples that will help me
> understand this?
> Thanks!
> -Ian
>

Reply via email to