Interface SqlValidatorWithHints

    • Method Detail

      • lookupHints

        java.util.List<SqlMoniker> lookupHints​(SqlNode topNode,
                                               SqlParserPos pos)
        Looks up completion hints for a syntactically correct SQL statement that has been parsed into an expression tree. (Note this should be called after SqlValidator.validate(org.apache.calcite.sql.SqlNode).
        Parameters:
        topNode - top of expression tree in which to lookup completion hints
        pos - indicates the position in the sql statement we want to get completion hints for. For example, "select a.ename, b.deptno from sales.emp a join sales.dept b "on a.deptno=b.deptno where empno=1"; setting pos to 'Line 1, Column 17' returns all the possible column names that can be selected from sales.dept table setting pos to 'Line 1, Column 31' returns all the possible table names in 'sales' schema
        Returns:
        an array of SqlMoniker (sql identifiers) that can fill in at the indicated position