Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4199 Add nullability annotations to the methods and fields, ensure consistency with checkerframework
  3. CALCITE-4371

TableMacro and TableFunction should have List<? extends Objects> rather than List<Object> parameters

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.26.0
    • 1.27.0
    • core
    • None

    Description

      Currently, the functions are declared as follows:

      public interface TableMacro extends Function {
        /**
         * Applies arguments to yield a table.
         *
         * @param arguments Arguments
         * @return Table
         */
        TranslatableTable apply(List<Object> arguments);
      }
      

      That means the method can't be called with List<String> parameter.

      It makes sense to adjust the parameter type to List<? extends Object>, then the call with List<String> would succeed.

      Note: this is source-incompatible change. So all the classes that implement TableMacro and TableFunction would need to be adjusted.

      Calcite codebase has <10 such classes, so I believe it should be ok.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vladimirsitnikov Vladimir Sitnikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: