aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/core/yql_library_compiler.h
blob: f44c5b42556b84a3aa01d5a3106d8fc63c0e92e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <yql/essentials/ast/yql_expr.h>
#include "yql_type_annotation.h"
#include <yql/essentials/sql/sql.h>

namespace NYql {

bool OptimizeLibrary(TLibraryCohesion& cohesion, TExprContext& ctx);
bool CompileLibrary(const NSQLTranslation::TTranslators& translators, const TString& alias,
    const TString& script, TExprContext& ctx, TLibraryCohesion& cohesion, bool optimize = true);

bool LinkLibraries(THashMap<TString, TLibraryCohesion>& libs, TExprContext& ctx, TExprContext& ctxToClone, const std::function<const TExportTable*(const TString&)>& module2ExportTable);
bool LinkLibraries(THashMap<TString, TLibraryCohesion>& libs, TExprContext& ctx, TExprContext& ctxToClone, const TModulesTable* loadedModules = nullptr);

bool CompileLibraries(const NSQLTranslation::TTranslators& translators, const TUserDataTable& userData,
    TExprContext& ctx, TModulesTable& modules, bool optimize = true);
//FIXME remove
bool CompileLibraries(const TUserDataTable& userData, TExprContext& ctx, TModulesTable& modules, bool optimize = true);
}