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

Decouple ModelHandler from CalciteConnection

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.40.0
    • None

    Description

      ModelHandler is mainly a parser that can transform YAML/JSON files into SchemaPlus objects.

      Currently, the class requires a CalciteConnection in order to be instantiated and the latter is a pretty heavyweight object. The usage of the CalciteConnection makes it rather cumbersome to instantiate and use the parsing capabilities of the ModelHander independently.

      In reality though, the handler does not need much from the CalciteConnection and we could easily refactor the handler to not depend on the connection at all.

      The motivation for this change is to facilitate the creation of schema objects from YAML/JSON files. A prominent use-case that I have in mind is the use of ModelHandler in unit tests where the models reside in JSON/YAML files.

      Attachments

        Issue Links

          Activity

            People

              zabetak Stamatis Zampetakis
              zabetak Stamatis Zampetakis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: