Skip to content

Commit

Permalink
Merge branch 'rightlib' into merge-libs-250207-2005
Browse files Browse the repository at this point in the history
  • Loading branch information
alexv-smirnov committed Feb 7, 2025
2 parents 178ae52 + bddf3d4 commit c377758
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 76 deletions.
15 changes: 1 addition & 14 deletions build/conf/java.conf
Original file line number Diff line number Diff line change
Expand Up @@ -475,25 +475,12 @@ JDK_LATEST_PEERDIR=build/platform/java/jdk/jdk${JDK_LATEST_VERSION}

# tag:java-specific
# Fill semantic by RUN_JAVA_PROGRAM()
_SEM_RUN_JAVA_PROGRAM=runs-ITEM \
&& runs-args ${Args} \
&& runs-classpath ${RUN_JAR_PROG_CP_PRE}${tool:CLASSPATH}${RUN_JAR_PROG_CP_SUF} \
&& runs-cwd ${CWD} ${hide;cwd:CWD} \
&& runs-in ${IN} ${hide;input:IN} \
&& runs-in_dir ${IN_DIR} \
&& runs-in_dirs_inputs ${IN_DIRS_INPUTS} \
&& runs-in_noparse ${IN_NOPARSE} ${hide;context=TEXT;input:IN_NOPARSE} \
&& runs-out ${OUT} ${hide;output:OUT} ${OUT_NOAUTO} ${hide;noauto;output:OUT_NOAUTO} \
$_GENTAR_HELPER(HASH_SUF $HASH_SUF OUT_DIR $OUT_DIR) \
&& runs-out_dir ${OUT_DIR} \
&& runs-tool ${TOOL} ${hide;tool:TOOL}

macro _DO_2_RUN_JAR_PROGRAM(IN_DIRS_VAR="uniq_", IN_DIRS_INPUTS[], IN{input}[], IN_NOPARSE{input}[], IN_DIR[], OUT_NOAUTO{output}[], OUT{output}[], TOOL{tool}[], OUT_DIR[], CLASSPATH[], ADD_SRCS_TO_CLASSPATH?"yes":"no", CWD="${ARCADIA_BUILD_ROOT}", STDOUT="", STDOUT_NOAUTO="", HASH_SUF="hash_suf", Args...) {
_LATE_GLOB(${IN_DIRS_VAR} ${suf=/**/*:IN_DIR})
_CHECK_RUN_JAVA_PROG_CLASSPATH($CLASSPATH)
.PEERDIR=build/platform/java/jdk $JDK_RESOURCE_PEERDIR
.CMD=${hide;kv:"p RJ"} ${hide;kv:"pc blue"} ${hide:JAVA_FAKEID} ${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/mkdir.py"} ${OUT_DIR} && ${cwd:CWD} $YMAKE_PYTHON ${input:"build/scripts/setup_java_tmpdir.py"} $YMAKE_PYTHON ${input:"build/scripts/stdout2stderr.py"} ${pre=--file=:STDOUT} ${hide;output:STDOUT} ${pre=--file=:STDOUT_NOAUTO} ${hide;noauto;output:STDOUT_NOAUTO} $YMAKE_PYTHON ${input:"build/scripts/fix_java_command_file_cp.py"} --build-root ${ARCADIA_BUILD_ROOT} $JDK_RESOURCE/bin/java -Dfile.encoding=utf8 -classpath ${RUN_JAR_PROG_CP_PRE}${tool:CLASSPATH}${RUN_JAR_PROG_CP_SUF} ${Args} && $_GENTAR_HELPER(HASH_SUF $HASH_SUF OUT_DIR $OUT_DIR) ${hide;input:IN} ${hide;context=TEXT;input:IN_NOPARSE} ${hide;noauto;output:OUT_NOAUTO} ${hide;output:OUT} ${hide;tool:TOOL} ${IN_DIRS_INPUTS}
.SEM=$_SEM_RUN_JAVA_PROGRAM
.SEM=runs-ITEM && runs-args ${Args} && runs-classpath ${RUN_JAR_PROG_CP_PRE}${tool:CLASSPATH}${RUN_JAR_PROG_CP_SUF} && runs-cwd ${CWD} ${hide;cwd:CWD} && runs-in ${IN} ${hide;input:IN} && runs-in_dir ${IN_DIR} && runs-in_dirs_inputs ${IN_DIRS_INPUTS} && runs-in_noparse ${IN_NOPARSE} ${hide;context=TEXT;input:IN_NOPARSE} && runs-out ${OUT} ${hide;output:OUT} ${OUT_NOAUTO} ${hide;noauto;output:OUT_NOAUTO} $_GENTAR_HELPER(HASH_SUF $HASH_SUF OUT_DIR $OUT_DIR) && runs-out_dir ${OUT_DIR} && runs-tool ${TOOL} ${hide;tool:TOOL}
}

# tag:java-specific
Expand Down
2 changes: 1 addition & 1 deletion build/conf/opensource_export.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
when ($OPENSOURCE_PROJECT) {
when ($OPENSOURCE_PROJECT != "") {
select ($OPENSOURCE_PROJECT) {
"catboost" ? {
OPENSOURCE_REPLACE_OPENSSL="1.1.1t"
Expand Down
20 changes: 14 additions & 6 deletions build/export_generators/ide-gradle/dependencies.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{%- macro AnnotationProcessors(funcName, annotation_processors) -%}
{%- if annotation_processors|length -%}
{%- set lomboks = annotation_processors|select('startsWith', 'contrib/java/org/projectlombok/lombok') -%}
{%- for lombok in lomboks %}
{{ funcName }}(files("$project_root/{{ lombok }}"))
{%- endfor -%}
{%- set annotation_processors = annotation_processors|reject('in', lomboks) -%}
{%- for annotation_processor in annotation_processors %}
{{ funcName }}(files("$project_root/{{ annotation_processor }}"))
{%- endfor -%}
{%- endif -%}
{%- endmacro -%}
{#- empty string #}
dependencies {
{%- for library in target.consumer if library.classpath -%}
Expand Down Expand Up @@ -36,9 +48,7 @@ dependencies {
{%- endif -%}
{%- endfor -%}

{%- for annotation_processor in target.use_annotation_processor %}
annotationProcessor(files("$project_root/{{ annotation_processor}}"))
{%- endfor -%}
{{ AnnotationProcessors("annotationProcessor", target.use_annotation_processor) }}

{%- for extra_target in extra_targets -%}
{%- for library in extra_target.consumer if library.classpath -%}
Expand All @@ -64,8 +74,6 @@ dependencies {
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- for annotation_processor in extra_target.use_annotation_processor %}
testAnnotationProcessor(files("$project_root/{{ annotation_processor}}"))
{%- endfor -%}
{{ AnnotationProcessors("testAnnotationProcessor", extra_target.use_annotation_processor) }}
{%- endfor %}
}
72 changes: 26 additions & 46 deletions build/ymake.core.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4377,15 +4377,13 @@ macro SYMLINK(From, To) {
# tag:internal
### @usage: _SEM_TARGET_SOURCES_FOR_HEADERS(Args...) # internal
### Generate prefix if Args is not empty
when ($EXPORT_CMAKE) {
_SEM_TARGET_SOURCES_FOR_HEADERS_PRE=
when ($EXPORT_CMAKE == "yes") {
_SEM_TARGET_SOURCES_FOR_HEADERS_PRE=&& target_options-privates-ITEM && target_options-privates-option target_sources && target_options-privates-args
}
elsewhen ($EXPORT_GRADLE) {
elsewhen ($EXPORT_GRADLE == "yes") {
_SEM_TARGET_SOURCES_FOR_HEADERS_PRE=&& custom_runs-outputs
}
otherwise {
_SEM_TARGET_SOURCES_FOR_HEADERS_PRE=
}
macro _SEM_TARGET_SOURCES_FOR_HEADERS_IMPL(Args...) {
.SEM=${pre=$_SEM_TARGET_SOURCES_FOR_HEADERS_PRE :Args}
}
Expand All @@ -4396,31 +4394,27 @@ macro _SEM_TARGET_SOURCES_FOR_HEADERS(Args...) {
# tag:internal
### @usage: _SEM_SET_ENV_FOR_CUSTOM_COMMAND(Args...) # internal
### Generate prefix before $Args if Args is not empty
when ($EXPORT_CMAKE) {
_SEM_SET_ENV_FOR_CUSTOM_COMMAND_PRE=
when ($EXPORT_CMAKE == "yes") {
_SEM_SET_ENV_FOR_CUSTOM_COMMAND_PRE=${CMAKE_COMMAND} -E env
}
elsewhen ($EXPORT_GRADLE) {
elsewhen ($EXPORT_GRADLE == "yes") {
_SEM_SET_ENV_FOR_CUSTOM_COMMAND_PRE=&& custom_runs-env
}
otherwise {
_SEM_SET_ENV_FOR_CUSTOM_COMMAND_PRE=
}
macro _SEM_SET_ENV_FOR_CUSTOM_COMMAND(Args...) {
.SEM=${pre=$_SEM_SET_ENV_FOR_CUSTOM_COMMAND_PRE :Args}
}

# tag:internal
### @usage: _SEM_SET_CWD(Args...) # internal
### Generate prefix before $Args if Args is not empty
when ($EXPORT_CMAKE) {
_SEM_SET_CWD_SEM=
when ($EXPORT_CMAKE == "yes") {
_SEM_SET_CWD_PRE=WORKING_DIRECTORY
}
elsewhen ($EXPORT_GRADLE) {
elsewhen ($EXPORT_GRADLE == "yes") {
_SEM_SET_CWD_PRE=&& custom_runs-cwd
}
otherwise {
_SEM_SET_CWD_SEM=
}
macro _SEM_SET_CWD(Args...) {
.SEM=${pre=$_SEM_SET_CWD_PRE :Args}
}
Expand Down Expand Up @@ -4553,7 +4547,8 @@ macro DECLARE_IN_DIRS(var_prefix, PATTERN, SRCDIR="", RECURSIVE?"**/":"", EXCLUD
### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or
### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
### Note that Tool is always built for the host platform, so be careful to provide that tool can be built for all Arcadia major host platforms (Linux, MacOS and Windows).
when ($EXPORT_CMAKE) {
_RUN_PROGRAM_SEM=
when ($EXPORT_CMAKE == "yes") {
_RUN_PROGRAM_SEM=target_commands-ITEM \
&& target_commands-macro add_custom_command \
&& target_commands-args \
Expand All @@ -4564,7 +4559,7 @@ when ($EXPORT_CMAKE) {
COMMAND ${tool:Tool} $Args ${pre=> :STDOUT} ${pre=> :STDOUT_NOAUTO} \
$_SEM_TARGET_SOURCES_FOR_HEADERS($OUT $OUT_NOAUTO $STDOUT $STDOUT_NOAUTO)
}
elsewhen ($EXPORT_GRADLE) {
elsewhen ($EXPORT_GRADLE == "yes") {
_RUN_PROGRAM_SEM=custom_runs-ITEM \
&& custom_runs-depends ${input:IN} ${context=TEXT;input:IN_NOPARSE} ${tool:Tool} ${tool:TOOL} \
$_SEM_SET_ENV_FOR_CUSTOM_COMMAND($ENV) \
Expand All @@ -4573,9 +4568,6 @@ elsewhen ($EXPORT_GRADLE) {
$_SEM_TARGET_SOURCES_FOR_HEADERS($OUT $OUT_NOAUTO $STDOUT $STDOUT_NOAUTO) \
$_SEM_SET_CWD($CWD)
}
otherwise {
_RUN_PROGRAM_SEM=
}
macro RUN_PROGRAM(Tool, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], INDUCED_DEPS[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], Args...) {
.CMD=${cwd:CWD} ${env:ENV} ${tool:Tool} $Args ${hide;input:IN} ${hide;context=TEXT;input:IN_NOPARSE} ${hide;input:IN_DEPS} ${hide;output_include:OUTPUT_INCLUDES} $INDUCED_DEPS ${hide;tool:TOOL} ${hide;output:OUT} ${hide;noauto;output:OUT_NOAUTO} ${stdout;output:STDOUT} ${stdout;noauto;output:STDOUT_NOAUTO} ${hide;kv:"p PR"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"}
.SEM=${hide;tool:Tool} ${hide;tool:TOOL} $_RUN_PROGRAM_SEM
Expand Down Expand Up @@ -4627,7 +4619,8 @@ macro RUN_LUA(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_N
###
### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or
### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
when ($EXPORT_CMAKE) {
_RUN_PYTHON3_SEM=
when ($EXPORT_CMAKE == "yes") {
_RUN_PYTHON3_SEM=packages-ITEM \
&& packages-name Python3 \
&& mpackages-ITEM \
Expand All @@ -4642,7 +4635,7 @@ when ($EXPORT_CMAKE) {
COMMAND Python3::Interpreter ${input:ScriptPath} $Args ${pre=> :STDOUT} ${pre=> :STDOUT_NOAUTO} \
$_SEM_TARGET_SOURCES_FOR_HEADERS($OUT $OUT_NOAUTO $STDOUT $STDOUT_NOAUTO)
}
elsewhen ($EXPORT_GRADLE) {
elsewhen ($EXPORT_GRADLE == "yes") {
_RUN_PYTHON3_SEM=custom_runs-ITEM \
&& custom_runs-depends ${input:IN} ${context=TEXT;input:IN_NOPARSE} ${input:ScriptPath} ${tool:TOOL} \
$_SEM_SET_ENV_FOR_CUSTOM_COMMAND($ENV) \
Expand All @@ -4651,16 +4644,14 @@ elsewhen ($EXPORT_GRADLE) {
$_SEM_TARGET_SOURCES_FOR_HEADERS($OUT $OUT_NOAUTO $STDOUT $STDOUT_NOAUTO) \
$_SEM_SET_CWD($CWD)
}
otherwise {
_RUN_PYTHON3_SEM=
}
macro RUN_PYTHON3(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], INDUCED_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], Args...) {
.CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON3 ${input:ScriptPath} $Args ${hide;input:IN} ${hide;context=TEXT;input:IN_NOPARSE} ${hide;output_include:OUTPUT_INCLUDES} $INDUCED_DEPS ${hide;tool:TOOL} ${hide;output:OUT} ${hide;noauto;output:OUT_NOAUTO} ${stdout;output:STDOUT} ${stdout;noauto;output:STDOUT_NOAUTO} ${hide;kv:"p PY"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"}
.SEM=$_RUN_PYTHON3_SEM
}

# tag:java-specific
when ($EXPORT_CMAKE) {
_RUN_ANTLR_BASE_SEM=
when ($EXPORT_CMAKE == "yes") {
_RUN_ANTLR_BASE_SEM=target_commands-ITEM \
&& target_commands-macro $SEM \
&& target_commands-args \
Expand All @@ -4669,16 +4660,13 @@ when ($EXPORT_CMAKE) {
$_SEM_SET_CWD($CWD) \
$SEM_ARGS_PREFIX $Args
}
elsewhen ($EXPORT_GRADLE) {
elsewhen ($EXPORT_GRADLE == "yes") {
_RUN_ANTLR_BASE_SEM=custom_runs-ITEM \
&& custom_runs-depends ${input:IN} \
&& custom_runs-command $SEM $Args \
&& custom_runs-outputs ${output:OUT} ${noauto;output:OUT_NOAUTO} \
$_SEM_SET_CWD($CWD)
}
otherwise {
_RUN_ANTLR_BASE_SEM=
}
macro _RUN_ANTLR_BASE(IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], INDUCED_DEPS[], TOOL[], STDOUT="", STDOUT_NOAUTO="", CWD="", JAR[], SEM="run_java", SEM_ARGS_PREFIX="", ENV[], HIDE_OUTPUT?"stderr2stdout":"stdout2stderr", Args...) {
PEERDIR(build/platform/java/jdk $JDK_RESOURCE_PEERDIR)
.CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON ${input;pre=build/scripts/:HIDE_OUTPUT.py} $JDK_RESOURCE/bin/java $JAR $Args ${hide;tool:TOOL} ${hide;input:IN} ${hide;context=TEXT;input:IN_NOPARSE} ${hide;output_include:OUTPUT_INCLUDES} $INDUCED_DEPS ${hide;output:OUT} ${hide;noauto;output:OUT_NOAUTO} ${stdout;output:STDOUT} ${stdout;noauto;output:STDOUT_NOAUTO} ${hide;kv:"p JV"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"}
Expand Down Expand Up @@ -4845,17 +4833,15 @@ macro BPF_STATIC(Input, Output, Opts...) {
###
### Compile LLVM bytecode to object representation.
### Note: Output name is used as is, no extension added.
when ($EXPORT_CMAKE) {
_LLVM_COMPILE_LL_SEM=
when ($EXPORT_CMAKE == "yes") {
_LLVM_COMPILE_LL_SEM=target_commands-ITEM \
&& target_commands-macro add_custom_command \
&& target_commands-args \
OUTPUT ${noauto;output:Output} \
DEPENDS ${input:Input} \
COMMAND ${LLVMAS} ${input:Input} -o ${noauto;output:Output}
}
otherwise {
_LLVM_COMPILE_LL_SEM=
}
macro LLVM_COMPILE_LL(Input, Output, Opts...) {
.CMD=${CLANG_BC_ROOT}/bin/llvm-as ${input:Input} -o ${noauto;output:Output} ${hide;kv:"p BC"} ${hide;kv:"pc light-green"}
.SEM=$_LLVM_COMPILE_LL_SEM
Expand All @@ -4866,17 +4852,15 @@ macro LLVM_COMPILE_LL(Input, Output, Opts...) {
###
### Call llvm-link on set of Inputs to produce Output.
### Note: Unlike many other macros output argument goes first. Output name is used as is, no extension added.
when ($EXPORT_CMAKE) {
_LLVM_LINK_SEM=
when ($EXPORT_CMAKE == "yes") {
_LLVM_LINK_SEM=target_commands-ITEM \
&& target_commands-macro add_custom_command \
&& target_commands-args \
OUTPUT ${noauto;output:Output} \
DEPENDS ${input:Inputs} \
COMMAND ${LLVMLINK} ${input:Inputs} -o ${noauto;output:Output}
}
otherwise {
_LLVM_LINK_SEM=
}
macro LLVM_LINK(Output, Inputs...) {
.CMD=${CLANG_BC_ROOT}/bin/llvm-link ${input:Inputs} -o ${noauto;output:Output} ${hide;kv:"p LD"} ${hide;kv:"pc light-red"}
.SEM=$_LLVM_LINK_SEM
Expand All @@ -4887,17 +4871,15 @@ macro LLVM_LINK(Output, Inputs...) {
###
### Call llvm-opt with set of Opts on Input to produce Output.
### Note: Output name is used as is, no extension added.
when ($EXPORT_CMAKE) {
_LLVM_OPT_SEM=
when ($EXPORT_CMAKE == "yes") {
_LLVM_OPT_SEM=target_commands-ITEM \
&& target_commands-macro add_custom_command \
&& target_commands-args \
OUTPUT ${noauto;output:Output} \
DEPENDS ${input:Input} \
COMMAND ${LLVMOPT} ${input:Input} -o ${noauto;output:Output} $Opts
}
otherwise {
_LLVM_OPT_SEM=
}
macro LLVM_OPT(Input, Output, Opts...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/llvm_opt_wrapper.py"} ${CLANG_BC_ROOT}/bin/opt ${input:Input} -o ${noauto;output:Output} $Opts ${hide;kv:"p OP"} ${hide;kv:"pc yellow"}
.SEM=$_LLVM_OPT_SEM
Expand All @@ -4909,17 +4891,15 @@ macro LLVM_OPT(Input, Output, Opts...) {
### Call llvm-llc with set of Opts on Src to produce object file.
###
### Note: Output name is calculated as concatenation of Src name and platform specific object file extension.
when ($EXPORT_CMAKE) {
_LLVM_LLC_SEM=
when ($EXPORT_CMAKE == "yes") {
_LLVM_LLC_SEM=target_commands-ITEM \
&& target_commands-macro add_custom_command \
&& target_commands-args \
OUTPUT ${output;suf=$OBJECT_SUF;noauto:Src} \
DEPENDS ${input:Src} \
COMMAND ${LLVMLLC} --filetype obj ${input:Src} -o ${output;suf=$OBJECT_SUF;noauto:Src} $Opts
}
otherwise {
_LLVM_LLC_SEM=
}
macro LLVM_LLC(Src, Opts...) {
.CMD=${tool:LLVM_LLC_TOOL} ${input:Src} --filetype obj -o ${output;suf=$OBJECT_SUF;noauto:Src} $Opts ${hide;kv:"p LC"} ${hide;kv:"pc yellow"}
.SEM=$_LLVM_LLC_SEM
Expand Down
1 change: 1 addition & 0 deletions yql/essentials/public/purecalc/common/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ TProgramFactoryOptions::TProgramFactoryOptions()
, NativeYtTypeFlags(0)
, UseSystemColumns(false)
, UseWorkerPool(true)
, UseAntlr4(false)
{
}

Expand Down
3 changes: 3 additions & 0 deletions yql/essentials/public/purecalc/common/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ namespace NYql {
/// Reuse allocated workers
bool UseWorkerPool;

/// Use Antlr4 parser (for migration)
bool UseAntlr4;

public:
TProgramFactoryOptions();

Expand Down
9 changes: 6 additions & 3 deletions yql/essentials/public/purecalc/common/program_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ IPullStreamWorkerFactoryPtr TProgramFactory::MakePullStreamWorkerFactory(
Options_.NativeYtTypeFlags,
Options_.DeterministicTimeProviderSeed,
Options_.UseSystemColumns,
Options_.UseWorkerPool
Options_.UseWorkerPool,
Options_.UseAntlr4
));
}

Expand Down Expand Up @@ -122,7 +123,8 @@ IPullListWorkerFactoryPtr TProgramFactory::MakePullListWorkerFactory(
Options_.NativeYtTypeFlags,
Options_.DeterministicTimeProviderSeed,
Options_.UseSystemColumns,
Options_.UseWorkerPool
Options_.UseWorkerPool,
Options_.UseAntlr4
));
}

Expand Down Expand Up @@ -155,6 +157,7 @@ IPushStreamWorkerFactoryPtr TProgramFactory::MakePushStreamWorkerFactory(
Options_.NativeYtTypeFlags,
Options_.DeterministicTimeProviderSeed,
Options_.UseSystemColumns,
Options_.UseWorkerPool
Options_.UseWorkerPool,
Options_.UseAntlr4
));
}
4 changes: 3 additions & 1 deletion yql/essentials/public/purecalc/common/worker_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ TWorkerFactory<TBase>::TWorkerFactory(TWorkerFactoryOptions options, EProcessorM
} else {
ExprRoot_ = Compile(options.Query, options.TranslationMode_,
options.ModuleResolver, options.SyntaxVersion_, options.Modules,
options.InputSpec, options.OutputSpec, processorMode);
options.InputSpec, options.OutputSpec, options.UseAntlr4, processorMode);

RawOutputType_ = GetSequenceItemType(ExprRoot_->Pos(), ExprRoot_->GetTypeAnn(), true, ExprContext_);

Expand Down Expand Up @@ -135,6 +135,7 @@ TExprNode::TPtr TWorkerFactory<TBase>::Compile(
const THashMap<TString, TString>& modules,
const TInputSpecBase& inputSpec,
const TOutputSpecBase& outputSpec,
bool useAntlr4,
EProcessorMode processorMode
) {
if (mode == ETranslationMode::PG && processorMode != EProcessorMode::PullList) {
Expand Down Expand Up @@ -179,6 +180,7 @@ TExprNode::TPtr TWorkerFactory<TBase>::Compile(
settings.SyntaxVersion = syntaxVersion;
settings.V0Behavior = NSQLTranslation::EV0Behavior::Disable;
settings.EmitReadsForExists = true;
settings.Antlr4Parser = useAntlr4;
settings.Mode = NSQLTranslation::ESqlMode::LIMITED_VIEW;
settings.DefaultCluster = PurecalcDefaultCluster;
settings.ClusterMapping[settings.DefaultCluster] = PurecalcDefaultService;
Expand Down
6 changes: 5 additions & 1 deletion yql/essentials/public/purecalc/common/worker_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ namespace NYql {
TMaybe<ui64> DeterministicTimeProviderSeed_;
bool UseSystemColumns;
bool UseWorkerPool;
bool UseAntlr4;

TWorkerFactoryOptions(
IProgramFactoryPtr Factory,
Expand All @@ -51,7 +52,8 @@ namespace NYql {
ui64 nativeYtTypeFlags,
TMaybe<ui64> deterministicTimeProviderSeed,
bool useSystemColumns,
bool useWorkerPool
bool useWorkerPool,
bool useAntlr4
)
: Factory(std::move(Factory))
, InputSpec(InputSpec)
Expand All @@ -71,6 +73,7 @@ namespace NYql {
, DeterministicTimeProviderSeed_(deterministicTimeProviderSeed)
, UseSystemColumns(useSystemColumns)
, UseWorkerPool(useWorkerPool)
, UseAntlr4(useAntlr4)
{
}
};
Expand Down Expand Up @@ -129,6 +132,7 @@ namespace NYql {
const THashMap<TString, TString>& modules,
const TInputSpecBase& inputSpec,
const TOutputSpecBase& outputSpec,
bool useAntlr4,
EProcessorMode processorMode);
};

Expand Down
Loading

0 comments on commit c377758

Please sign in to comment.