Class JdbcSplitQueryBuilder

    • Constructor Detail

      • JdbcSplitQueryBuilder

        public JdbcSplitQueryBuilder​(String quoteCharacters)
        Meant for connectors which do not yet support complex expressions.
      • JdbcSplitQueryBuilder

        public JdbcSplitQueryBuilder​(String quoteCharacters,
                                     FederationExpressionParser federationExpressionParser)
        Parameters:
        quoteCharacters - database quote character for enclosing identifiers.
    • Method Detail

      • buildSql

        public PreparedStatement buildSql​(Connection jdbcConnection,
                                          String catalog,
                                          String schema,
                                          String table,
                                          org.apache.arrow.vector.types.pojo.Schema tableSchema,
                                          Constraints constraints,
                                          Split split)
                                   throws SQLException
        Common logic to build Split SQL including constraints translated in where clause.
        Parameters:
        jdbcConnection - JDBC connection. See Connection.
        catalog - Athena provided catalog name.
        schema - table schema name.
        table - table name.
        tableSchema - table schema (column and type information).
        constraints - constraints passed by Athena to push down.
        split - table split.
        Returns:
        prepated statement with SQL. See PreparedStatement.
        Throws:
        SQLException - JDBC database exception.
      • extractOrderByClause

        protected String extractOrderByClause​(Constraints constraints)
      • getPartitionWhereClauses

        protected abstract List<String> getPartitionWhereClauses​(Split split)
      • appendLimitOffset

        protected String appendLimitOffset​(Split split)