[
https://issues.apache.org/jira/browse/CALCITE-775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16879523#comment-16879523
]
Pavel Tcholakov commented on CALCITE-775:
-----------------------------------------
Looking through some old issues; it seems to me that this is largely done:
- CustomSchema is created with AvaticaUtils.instantiatePlugin: [
ModelHandler.java:280|https://github.com/apache/calcite/blob/b47413a1d648455c43dbe8d51df926ebd68b3a36/core/src/main/java/org/apache/calcite/model/ModelHandler.java#L278-L280]
(changed in CALCITE-1259)
- JdbcSchema is created with AvaticaUtils.instantiatePlugin:
[ModelHandler.java:342|https://github.com/apache/calcite/blob/1748f0503e7b626a8d0165f1698adb8b61bbc31e/core/src/main/java/org/apache/calcite/model/ModelHandler.java#L342-L343]
(changed in CALCITE-1913)
- CustomTable is created with AvaticaUtils.instantiatePlugin: [
ModelHandler.java:431|https://github.com/apache/calcite/blob/b47413a1d648455c43dbe8d51df926ebd68b3a36/core/src/main/java/org/apache/calcite/model/ModelHandler.java#L431-L433]
(changed in CALCITE-1259)
Could you please clarify the JdbcSchema.dataSourceName requirement? I'm not
sure I understand it in the context of the code as is.
I also am not sure if the ` "class" operand passed to ReflectiveSchema.Factory`
is still relevant? (cf.
[ModelHandler.java:281|https://github.com/apache/calcite/blob/b47413a1d648455c43dbe8d51df926ebd68b3a36/core/src/main/java/org/apache/calcite/model/ModelHandler.java#L281-L283]).
> Instantiate custom schemas, tables as plugins
> ---------------------------------------------
>
> Key: CALCITE-775
> URL: https://issues.apache.org/jira/browse/CALCITE-775
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Priority: Major
> Labels: newbie
>
> Custom schemas and tables are currently instantiated by looking for a public
> default constructor. When instantiating them, we also need to look for a
> static member called INSTANCE, and if there is a '#' in the class name look
> for named static field.
> For the fields JsonCustomSchema.factory and JsonCustomTable.factory, fix the
> code in ModelHandler to use AvaticaUtils.instantiatePlugin, update the
> javadoc and update the documentation in model.md.
> Also JdbcSchema.dataSourceName.
> Also the "class" operand passed to ReflectiveSchema.Factory.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)