Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3091

Expose defaultSchema .json parameter to SchemaFactory

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.19.0
    • Fix Version/s: None
    • Component/s: jdbc-adapter
    • Labels:
      None

      Description

      Currently, when you use JDBC adapter and have custom schema factory, you provide .json file with your schema definition and link to your SchemaFactory implementation that is called to create that Schema for the rest of the system. 

      That .json file has in root a 'defaultSchema' parameter that Calcite uses to know what the default schema is. Unfortunately, that parameter is not exposed when implementing SchemaFactory interface, and there are use cases where that would be useful.

      For example, one use case is when having multiple custom schemas, to know which one is the default one while you're creating it inside SchemaFactory implementation.

      My specific use-case is I want to use that .json parameter for "filtering" schemas. The current workaround for that is to have two SchemaFactory implementations that are then later connected in code, but it would be easier if I could just check in SchemaFactory if my schema is the defaultSchema and do the appropriate logic there.

      I'm willing to do the work to make this change if someone can point me in the right direction.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              igrgurina Ivan Grgurina
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: