docs: @Nullable
    private static TableMacro getView(final SchemaPlus schemaPlus, final String functionName)
    {
      // Look for a zero-arg function that is also a TableMacro. The returned value
      // is never null so we don't need to check for that.
      final Collection<org.apache.calcite.schema.Function> functions =
          schemaPlus.getFunctions(functionName);
  
      for (org.apache.calcite.schema.Function function : functions) {
        if (function.getParameters().isEmpty() && function instanceof TableMacro) {
          return (TableMacro) function;
        }
      }
  
      return null;
    }