@NotNull
    private SQLDialect obtainCurrentSqlDialect(@Nullable DBCExecutionContext executionContext) {
        try {
            DBPDataSourceContainer dsContainer = EditorUtils.getInputDataSource(this.editor.getEditorInput());
            SQLDialect dialect = executionContext != null && executionContext.getDataSource() != null
                ? executionContext.getDataSource().getSQLDialect()
                : dsContainer != null ? dsContainer.getScriptDialect().createInstance() : BasicSQLDialect.INSTANCE;
            return dialect;
        } catch (DBException ex) {
            return BasicSQLDialect.INSTANCE;
        }
    }
Prepare completion context for the specified position in the text
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/semantics/SQLBackgroundParsingJob.java