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

Allow overloading the created enumerable in Calcite when calling getTables() or getColumns()

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.36.0
    • None

    Description

      The goal is to introduce a mechanism that allows overloading the enumerable type that is created when getTables() and getColumns() is called. If a user provides an overloaded MetaTable/ MetaColumn class, then they can add in additional metadata fields that they would like to be transferred. 
       
      Currently, CalciteMetaImpl in getTables() and getColumns() calls are hardcoded to do reflection on MetaTable.class and MetaColumn.class ‘ fields, matched with the list of column names that are passed in. Reflection is important here, as it creates the proper ColumnMetaData and Signature that the client needs to deserialize. 
      See here for getTables()] and here for getColumns()
       
       
      I would like to introduce fields ( metaTableClass , metaColumnClass ) on CalciteMetaImpl that determine which class to use for each of these. This will be configured as a CalciteConnectionProperty when making the jdbc:calcite connection, and default to MetaTable.class and MetaColumn.class if not provided. 
       
       
      Requirements:

      • User can specify in Properties new CalciteConnectionProperty ’s to specify which overloaded class of CalciteMetaTable and MetaColumn to use
      • If not specified, it will default to CalciteMetaTable.class and MetaColumn.class

       
       

      The provided overloaded class will create a subclass of CalciteMetaTable / MetaColumn that has the same shape constructor and also provide an override for the function getColumnNames().

      Attachments

        Issue Links

          Activity

            People

              oliverlee Oliver Lee
              oliverlee Oliver Lee
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: