public class SqlEngine extends Object implements AutoCloseable
| Constructor and Description |
|---|
SqlEngine(String sql,
TypeOuterClass.Database database)
Construct SQL engine for specific sql and database.
|
SqlEngine(String sql,
TypeOuterClass.Database database,
EngineOptions engineOptions)
Construct SQL engine for specific sql, database and EngineOptions.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static EngineOptions |
createDefaultEngineOptions()
Create default engine option.
|
ByteBuffer |
getIrBuffer()
Return compile IR result as ByteBuffer.
|
PhysicalOpNode |
getPlan()
Return physical plan.
|
void |
initilize(String sql,
TypeOuterClass.Database database,
EngineOptions engineOptions)
Initialize engine with given sql, database and specified engine options.
|
public SqlEngine(String sql, TypeOuterClass.Database database) throws UnsupportedHybridSeException
UnsupportedHybridSeException - throws exception when fail to compile queriespublic SqlEngine(String sql, TypeOuterClass.Database database, EngineOptions engineOptions) throws UnsupportedHybridSeException
UnsupportedHybridSeException - throws exception when fail to compile queriespublic static EngineOptions createDefaultEngineOptions()
- Enable store ir results into SQL context - Only compile SQL - Disable performance sensitive mode.
public void initilize(String sql, TypeOuterClass.Database database, EngineOptions engineOptions) throws UnsupportedHybridSeException
sql - query sql stringdatabase - query on the databaseengineOptions - query engine optionsUnsupportedHybridSeException - throw when query unsupported or has syntax errorpublic PhysicalOpNode getPlan()
public ByteBuffer getIrBuffer()
public void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2021. All rights reserved.