Class ViewTableMacro

    • Field Detail

      • viewSql

        protected final java.lang.String viewSql
      • modifiable

        private final java.lang.Boolean modifiable
      • schemaPath

        protected final java.util.List<java.lang.String> schemaPath
        Typically null. If specified, overrides the path of the schema as the context for validating viewSql.
      • viewPath

        protected final java.util.List<java.lang.String> viewPath
    • Constructor Detail

      • ViewTableMacro

        public ViewTableMacro​(CalciteSchema schema,
                              java.lang.String viewSql,
                              java.util.List<java.lang.String> schemaPath,
                              java.util.List<java.lang.String> viewPath,
                              java.lang.Boolean modifiable)
        Creates a ViewTableMacro.
        Parameters:
        schema - Root schema
        viewSql - SQL defining the view
        schemaPath - Schema path relative to the root schema
        viewPath - View path relative to the schema path
        modifiable - Request that a view is modifiable (dependent on analysis of viewSql)
    • Method Detail

      • getParameters

        public java.util.List<FunctionParameter> getParameters()
        Description copied from interface: Function
        Returns the parameters of this function.
        Specified by:
        getParameters in interface Function
        Returns:
        Parameters; never null
      • apply

        public TranslatableTable apply​(java.util.List<java.lang.Object> arguments)
        Description copied from interface: TableMacro
        Applies arguments to yield a table.
        Specified by:
        apply in interface TableMacro
        Parameters:
        arguments - Arguments
        Returns:
        Table
      • viewTable

        protected ViewTable viewTable​(CalcitePrepare.AnalyzeViewResult parsed,
                                      java.lang.String viewSql,
                                      java.util.List<java.lang.String> schemaPath,
                                      java.util.List<java.lang.String> viewPath)
        Allows a sub-class to return an extension of ViewTable by overriding this method.