Module jakarta.json

Class ExasolLocalQueryRewriter

  • All Implemented Interfaces:
    com.exasol.adapter.dialects.QueryRewriter

    public class ExasolLocalQueryRewriter
    extends Object
    implements com.exasol.adapter.dialects.QueryRewriter
    Exasol-specific query rewriter for cases where the IS_LOCAL option is used.

    In this case the query is rewritten into a SELECT rather than to the usual IMPORT statement. This way the Virtual Schema query can directly be executed on the local database in the context of the statement it was embedded in. That saves the overhead of using the ExaLoader and is thus considerably faster.

    • Constructor Detail

      • ExasolLocalQueryRewriter

        public ExasolLocalQueryRewriter​(com.exasol.adapter.dialects.SqlDialect dialect)
        Create a new instance of the ExasolLocalQueryRewriter.
        Parameters:
        dialect - dialect
    • Method Detail

      • rewrite

        public String rewrite​(com.exasol.adapter.sql.SqlStatement statement,
                              List<com.exasol.adapter.metadata.DataType> selectListDataTypes,
                              com.exasol.ExaMetadata exaMetadata,
                              com.exasol.adapter.AdapterProperties properties)
                       throws com.exasol.adapter.AdapterException
        Specified by:
        rewrite in interface com.exasol.adapter.dialects.QueryRewriter
        Throws:
        com.exasol.adapter.AdapterException