git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to pass a custom object as an operand to the schema factory ?


I see that the SchemaFactory's create method
<https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/schema/SchemaFactory.java#L68>
accepts a Map of Object values which suggests that I can put any Java
object in this map.

I used to pass strings just fine but now I need to pass expensive objects
that I can't afford creating once more in the SchemaFactory.

I thought about having an external structure that holds these expensive
objects and I would look them up from the SchemaFactory but I'm hoping
there would be another way to evade that.

Has anyone faced such a case before and would kindly share his solution ?

Thanks,
Gelbana