- java.lang.Object
-
- com.exasol.adapter.dialects.exasol.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 theIS_LOCALoption is used.In this case the query is rewritten into a
SELECTrather than to the usualIMPORTstatement. 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 Summary
Constructors Constructor Description ExasolLocalQueryRewriter(com.exasol.adapter.dialects.SqlDialect dialect)Create a new instance of theExasolLocalQueryRewriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringrewrite(com.exasol.adapter.sql.SqlStatement statement, List<com.exasol.adapter.metadata.DataType> selectListDataTypes, com.exasol.ExaMetadata exaMetadata, com.exasol.adapter.AdapterProperties properties)
-
-
-
Constructor Detail
-
ExasolLocalQueryRewriter
public ExasolLocalQueryRewriter(com.exasol.adapter.dialects.SqlDialect dialect)
Create a new instance of theExasolLocalQueryRewriter.- 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:
rewritein interfacecom.exasol.adapter.dialects.QueryRewriter- Throws:
com.exasol.adapter.AdapterException
-
-