diff options
author | Alexander Smirnov <alex@ydb.tech> | 2025-04-19 00:51:37 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2025-04-19 00:51:37 +0000 |
commit | c46f4db13aad94d84f1930f145dc0d4cf79cbf43 (patch) | |
tree | f59e23b072305d922f5836f129bcd0c7dac5fdc9 | |
parent | f73bc5d691a9919f911d7236692c067ef127e9e2 (diff) | |
parent | 605a8a3075d2116bf0c742d7ae889ba14b801a8e (diff) | |
download | ydb-c46f4db13aad94d84f1930f145dc0d4cf79cbf43.tar.gz |
Merge branch 'rightlib' into merge-libs-250419-0050
92 files changed, 786 insertions, 365 deletions
diff --git a/build/conf/docs.conf b/build/conf/docs.conf index b190556dc77..03e77f04f1f 100644 --- a/build/conf/docs.conf +++ b/build/conf/docs.conf @@ -11,7 +11,7 @@ TOUCH_DOCS_MF=$TOUCH_DOCS && $GENERATE_MF ### ### Copy files from src_dir to $BINDIR/dst_dir macro DOCS_COPY_FILES(FROM="${CURDIR}", NAMESPACE=".", FILES...) { - .CMD=$YMAKE_PYTHON3 ${input:"build/scripts/copy_docs_files.py"} ${hide;input:"build/scripts/process_command_files.py"} --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT --src-dir $FROM --dst-dir $BINDIR/$NAMESPACE $FILES ${hide;context=TEXT;input;pre=${FROM}/:FILES} ${hide;output;pre=${NAMESPACE}/:FILES} + .CMD=$YMAKE_PYTHON3 ${input:"build/scripts/copy_docs_files.py"} ${hide;input:"build/scripts/process_command_files.py"} --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT --src-dir $FROM --dst-dir $BINDIR/$NAMESPACE $FILES ${hide;context=TEXT;input=TEXT;pre=${FROM}/:FILES} ${hide;output;pre=${NAMESPACE}/:FILES} } # tag:docs @@ -71,7 +71,7 @@ _DOCS_SKIP_NAMESPACE= # tag:internal tag:docs _DOCS_LIBRARY_CMDLINE=\ -$YMAKE_PYTHON3 ${input:"build/scripts/copy_docs_files_to_dir.py"} ${hide;input:"build/scripts/process_command_files.py"} $_DOCS_IMPLICIT_SRCS_VALUE $_DOCS_DIR_VALUE $_DOCS_BIN_DIR_VALUE --dest-dir $BINDIR/__s --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT --srcs ${context=TEXT;input:SOURCES} --include-srcs ${context=TEXT;input:INCLUDE_SOURCES} $_DOCS_SKIP_NAMESPACE \ +$YMAKE_PYTHON3 ${input:"build/scripts/copy_docs_files_to_dir.py"} ${hide;input:"build/scripts/process_command_files.py"} $_DOCS_IMPLICIT_SRCS_VALUE $_DOCS_DIR_VALUE $_DOCS_BIN_DIR_VALUE --dest-dir $BINDIR/__s --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT --srcs ${context=TEXT;input=TEXT:SOURCES} --include-srcs ${context=TEXT;input=TEXT:INCLUDE_SOURCES} $_DOCS_SKIP_NAMESPACE \ && $YMAKE_PYTHON3 ${input:"build/scripts/tar_sources.py"} --output $TARGET --input $BINDIR/__s $_DOCS_KV # tag:internal tag:docs diff --git a/build/conf/go.conf b/build/conf/go.conf index de22483a630..085e840a470 100644 --- a/build/conf/go.conf +++ b/build/conf/go.conf @@ -230,17 +230,17 @@ GO_TOOL=$YMAKE_PYTHON3 ${input:"build/scripts/go_tool.py"} $_PROCESS_WHOLE_ARCHI # tag:go-specific macro _GO_LINK_LIB_IMPL(CGO_FILES[], EXTRA_INPUTS[], EXTRA_TEXT_INPUTS[], GO_FILES...) { - .CMD=${hide:_GO_FAKEID} $GO_TOOL ${hide;input:EXTRA_INPUTS} ${hide;context=TEXT;input:EXTRA_TEXT_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_PROTO_FROM_SCHEMA|local,GO_FBS:PEERS} --ya-end-command-file ${hide;kv:"p GO"} ${hide;kv:"pc light-red"} ${hide;kv:"show_out"} + .CMD=${hide:_GO_FAKEID} $GO_TOOL ${hide;input:EXTRA_INPUTS} ${hide;context=TEXT;input=TEXT:EXTRA_TEXT_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_PROTO_FROM_SCHEMA|local,GO_FBS:PEERS} --ya-end-command-file ${hide;kv:"p GO"} ${hide;kv:"pc light-red"} ${hide;kv:"show_out"} } # tag:go-specific macro _GO_LINK_EXE_IMPL(CGO_FILES[], EXTRA_INPUTS[], EXTRA_TEXT_INPUTS[], GO_FILES...) { - .CMD=${hide:_GO_FAKEID} $GO_TOOL ${hide;input:EXTRA_INPUTS} ${hide;context=TEXT;input:EXTRA_TEXT_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++ld_plugins ${ext=.pyplugin:SRCS_GLOBAL} ++vcs $VCS_GO $GO_EXTLD ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_PROTO_FROM_SCHEMA|local,GO_FBS:PEERS} ++non-local-peers ${rootrel;tags_in=GO|GO_PROTO|GO_PROTO_FROM_SCHEMA|GO_FBS|;tags_out=local:PEERS} ++cgo-peers ${VCS_C_OBJ_RR} ${_EXTRA_OBJS} ${rootrel;tags_out=GO|GO_PROTO|GO_PROTO_FROM_SCHEMA|GO_FBS|RESOURCE_LIB:PEERS} --ya-end-command-file ${hide;kv:"p LD"} ${hide;kv:"pc light-red"} ${hide;kv:"show_out"} && $_GO_LINK_EXE_EXT_CMD + .CMD=${hide:_GO_FAKEID} $GO_TOOL ${hide;input:EXTRA_INPUTS} ${hide;context=TEXT;input=TEXT:EXTRA_TEXT_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++ld_plugins ${ext=.pyplugin:SRCS_GLOBAL} ++vcs $VCS_GO $GO_EXTLD ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_PROTO_FROM_SCHEMA|local,GO_FBS:PEERS} ++non-local-peers ${rootrel;tags_in=GO|GO_PROTO|GO_PROTO_FROM_SCHEMA|GO_FBS|;tags_out=local:PEERS} ++cgo-peers ${VCS_C_OBJ_RR} ${_EXTRA_OBJS} ${rootrel;tags_out=GO|GO_PROTO|GO_PROTO_FROM_SCHEMA|GO_FBS|RESOURCE_LIB:PEERS} --ya-end-command-file ${hide;kv:"p LD"} ${hide;kv:"pc light-red"} ${hide;kv:"show_out"} && $_GO_LINK_EXE_EXT_CMD } # tag:go-specific macro _GO_LINK_TEST_IMPL(CGO_FILES[], EXTRA_INPUTS[], EXTRA_TEXT_INPUTS[], GO_TEST_FILES[], GO_XTEST_FILES[], GO_FILES...) { - .CMD=${hide:_GO_FAKEID} $GO_TOOL ${hide;input:EXTRA_INPUTS} ${hide;context=TEXT;input:EXTRA_TEXT_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++ld_plugins ${ext=.pyplugin:SRCS_GLOBAL} ++vcs $VCS_GO $GO_EXTLD ++test-miner $GO_TEST_MINER ++test-import-path $GO_TEST_IMPORT_PATH ++peers ${rootrel;tags_in=local,GO|local,GO_PROGRAM|local,GO_PROTO|local,GO_PROTO_FROM_SCHEMA|local,GO_FBS:PEERS} ++non-local-peers ${rootrel;tags_in=GO|GO_PROTO|GO_PROTO_FROM_SCHEMA|GO_FBS;tags_out=local:PEERS} ++cgo-peers ${VCS_C_OBJ_RR} ${rootrel;tags_out=GO|GO_PROGRAM|GO_PROTO|GO_PROTO_FROM_SCHEMA|GO_FBS|RESOURCE_LIB:PEERS} ++test_srcs ${input:GO_TEST_FILES} ++xtest_srcs ${input:GO_XTEST_FILES} ++cover_info $GO_COVER_INFO_VALUE ++skip-tests $_GO_SKIP_TEST_VALUE --ya-end-command-file ${hide;kv:"p GO"} ${hide;kv:"pc light-red"} ${hide;kv:"show_out"} + .CMD=${hide:_GO_FAKEID} $GO_TOOL ${hide;input:EXTRA_INPUTS} ${hide;context=TEXT;input=TEXT:EXTRA_TEXT_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++ld_plugins ${ext=.pyplugin:SRCS_GLOBAL} ++vcs $VCS_GO $GO_EXTLD ++test-miner $GO_TEST_MINER ++test-import-path $GO_TEST_IMPORT_PATH ++peers ${rootrel;tags_in=local,GO|local,GO_PROGRAM|local,GO_PROTO|local,GO_PROTO_FROM_SCHEMA|local,GO_FBS:PEERS} ++non-local-peers ${rootrel;tags_in=GO|GO_PROTO|GO_PROTO_FROM_SCHEMA|GO_FBS;tags_out=local:PEERS} ++cgo-peers ${VCS_C_OBJ_RR} ${rootrel;tags_out=GO|GO_PROGRAM|GO_PROTO|GO_PROTO_FROM_SCHEMA|GO_FBS|RESOURCE_LIB:PEERS} ++test_srcs ${input:GO_TEST_FILES} ++xtest_srcs ${input:GO_XTEST_FILES} ++cover_info $GO_COVER_INFO_VALUE ++skip-tests $_GO_SKIP_TEST_VALUE --ya-end-command-file ${hide;kv:"p GO"} ${hide;kv:"pc light-red"} ${hide;kv:"show_out"} } # tag:go-specific @@ -1114,12 +1114,12 @@ macro GO_MOCKGEN_MOCKS() { _GO_MOCKGEN_SOURCE_CMDLINE=\ $FS_TOOLS md ${BINDIR}/.arcadia/vendor && \ $FS_TOOLS md ${BINDIR}/.arcadia/$MOCKGEN_FROM && \ - $COPY_CMD ${context=TEXT;input:_GO_GO_MOD} ${BINDIR}/.arcadia/go.mod && \ - $COPY_CMD ${context=TEXT;input:_GO_MODULES_TXT} ${BINDIR}/.arcadia/vendor/modules.txt && \ - $COPY_CMD ${context=TEXT;input:SOURCE} ${BINDIR}/.arcadia/$SOURCE && \ - ${cwd;suf=/.arcadia:BINDIR} ${tool:_GO_TOOL_MOCKGEN} -package ${MOCKGEN_PACKAGE} -source ${rootrel;context=TEXT;input:SOURCE} ${ARGS} \ + $COPY_CMD ${context=TEXT;input=TEXT:_GO_GO_MOD} ${BINDIR}/.arcadia/go.mod && \ + $COPY_CMD ${context=TEXT;input=TEXT:_GO_MODULES_TXT} ${BINDIR}/.arcadia/vendor/modules.txt && \ + $COPY_CMD ${context=TEXT;input=TEXT:SOURCE} ${BINDIR}/.arcadia/$SOURCE && \ + ${cwd;suf=/.arcadia:BINDIR} ${tool:_GO_TOOL_MOCKGEN} -package ${MOCKGEN_PACKAGE} -source ${rootrel;context=TEXT;input=TEXT:SOURCE} ${ARGS} \ $_GO_TOOL_ENV ${stdout;output;suf=.source.gen.go;noext:FILENAME} \ - ${hide;context=TEXT;input;suf=/.arcadia/go.mod:BINDIR} ${hide;context=TEXT;input;suf=/.arcadia/vendor/modules.txt:BINDIR} ${hide;context=TEXT;input:IN_NOPARSE} \ + ${hide;context=TEXT;input=TEXT;suf=/.arcadia/go.mod:BINDIR} ${hide;context=TEXT;input=TEXT;suf=/.arcadia/vendor/modules.txt:BINDIR} ${hide;context=TEXT;input=TEXT:IN_NOPARSE} \ ${hide;kv:"p GS"} ${hide;kv:"pc blue"} # tag:go-specific @@ -1141,7 +1141,7 @@ macro GO_MOCKGEN_SOURCE(FILE, ARGS[], IN_NOPARSE[]) { } macro _GO_OAPI_CODEGEN_IMPL(TOOL, IN, FILENAME, GENERATE="", PACKAGE="", TEMPLATES="", CONFIG="", IN_NOPARSE[], Args...) { - .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:TOOL} ${pre=--generate :GENERATE} ${pre=--package :PACKAGE} ${pre=--templates :TEMPLATES} ${pre=--config :CONFIG} $Args ${context=TEXT;input:IN} ${hide;context=TEXT;input:IN_NOPARSE} ${stdout;output:FILENAME} ${_GO_TOOL_ENV} ${hide;kv:"p GC"} ${hide;kv:"pc blue"} + .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:TOOL} ${pre=--generate :GENERATE} ${pre=--package :PACKAGE} ${pre=--templates :TEMPLATES} ${pre=--config :CONFIG} $Args ${context=TEXT;input=TEXT:IN} ${hide;context=TEXT;input=TEXT:IN_NOPARSE} ${stdout;output:FILENAME} ${_GO_TOOL_ENV} ${hide;kv:"p GC"} ${hide;kv:"pc blue"} } # tag:go-specific diff --git a/build/conf/java.conf b/build/conf/java.conf index 57880fe65fb..40517863770 100644 --- a/build/conf/java.conf +++ b/build/conf/java.conf @@ -299,6 +299,7 @@ multimodule JAVA_CONTRIB_PROGRAM { SET(MODULE_TYPE JAVA_PROGRAM) ENABLE(DISABLE_SCRIPTGEN) + DISABLE(_NEED_SBOM_INFO) } module JAR_COMPILATION: JAVA_CONTRIB { .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO @@ -475,8 +476,8 @@ macro _DO_2_RUN_JAR_PROGRAM(IN_DIRS_VAR="uniq_", IN_DIRS_INPUTS[], IN{input}[], _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=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:TOOL} + .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=TEXT:IN_NOPARSE} ${hide;noauto;output:OUT_NOAUTO} ${hide;output:OUT} ${hide;tool:TOOL} ${IN_DIRS_INPUTS} + .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=TEXT: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:TOOL} } # tag:java-specific @@ -584,6 +585,7 @@ SRC_RESOURCE_ID= FETCH_SRCS_JAR= FETCH_TARGET_JAR= FETCH_CONTRIB_JAR=${hide:JAVA_FAKEID} && $FETCH_TARGET_JAR && $FETCH_SRCS_JAR +GEN_JAR_SBOM_COMPONENT= # tag:java-specific macro JAR_RESOURCE(Id) { @@ -616,7 +618,7 @@ _JAVA_CONTRIB_SEM= \ # tag:java-specific module JAVA_CONTRIB: _JAR_BASE { - .CMD=$FETCH_CONTRIB_JAR + .CMD=$FETCH_CONTRIB_JAR && $GEN_JAR_SBOM_COMPONENT .PEERDIR_POLICY=as_include .SEM=_JAVA_CONTRIB_SEM .FINAL_TARGET=yes diff --git a/build/conf/python.conf b/build/conf/python.conf index d99de1e8545..1ac5352756f 100644 --- a/build/conf/python.conf +++ b/build/conf/python.conf @@ -41,7 +41,7 @@ contrib/tools/cython/Cython/Utility/TestUtilityLoader.c \ contrib/tools/cython/Cython/Utility/TypeConversion.c macro _UNWRAP_TEXT_INPUTS(Files...) { - .CMD=${hide;context=TEXT;input:Files} + .CMD=${hide;context=TEXT;input=TEXT:Files} } macro _UNWRAP_OUTPUT_INCLUDES(Files...) { diff --git a/build/conf/ts/ts.conf b/build/conf/ts/ts.conf index b6f6fbad7ba..6568374ec6a 100644 --- a/build/conf/ts/ts.conf +++ b/build/conf/ts/ts.conf @@ -184,8 +184,8 @@ TS_GLOB_EXCLUDE=$TS_CONFIG_PATH \ # Ugly hack for using inputs from the variable macro _AS_HIDDEN_INPUTS(IN{input}[]) { - # "context=TEXT" exclude file from the "include processing" - .CMD=${hide;context=TEXT;input:IN} + # "=TEXT" exclude file from the "include processing" + .CMD=${hide;context=TEXT;input=TEXT:IN} } # Input/output directives for files set by use with diff --git a/build/export_generators/ide-gradle/dependencies.jinja b/build/export_generators/ide-gradle/dependencies.jinja index d5958c36acc..1a9cb90afb3 100644 --- a/build/export_generators/ide-gradle/dependencies.jinja +++ b/build/export_generators/ide-gradle/dependencies.jinja @@ -5,81 +5,94 @@ {{ funcName }}(files("$arcadia_root/{{ lombok }}")) {%- endfor -%} {%- set annotation_processors = annotation_processors|reject('in', lomboks) -%} -{%- for annotation_processor in annotation_processors %} +{%- if annotation_processors|length -%} +{%- for annotation_processor in annotation_processors %} {{ funcName }}(files("$arcadia_root/{{ annotation_processor }}")) -{%- endfor -%} -{%- endif -%} -{%- endmacro -%} -{#- empty string #} -dependencies { -{%- for library in target.consumer if library.classpath -%} -{%- if has_errorprone -%} -{%- if library.prebuilt and (library.type != "contrib" or build_contribs) and ("contrib/java/com/google/errorprone/error_prone_annotations" in library.jar) -%} -{%- set errorprone_version = library.jar|replace("contrib/java/com/google/errorprone/error_prone_annotations/", "") -%} -{%- set errorprone_parts = split(errorprone_version, '/', 2) %} - errorprone("com.google.errorprone:error_prone_core:{{ errorprone_parts[0] }}") +{%- endfor -%} {%- endif -%} {%- endif -%} +{%- endmacro -%} -{%- if library.prebuilt and library.jar and (library.type != "contrib" or build_contribs) %} - implementation(files("$arcadia_root/{{ library.jar }}")) -{%- else -%} -{%- set classpath = library.classpath -%} -{%- if classpath|replace('"','') == classpath -%} -{%- set classpath = '"' + classpath + '"' -%} -{%- endif -%} -{%- include "[generator]/patch_classpath.jinja" -%} -{%- if library.type != "contrib" %} -{%- if library.testdep -%} -{%- set classpath = '":' + library.testdep | replace("/", ":") + '"' -%} -{%- include "[generator]/patch_classpath.jinja" %} - implementation(project(path = {{ classpath }}, configuration = "testArtifacts")) -{%- else %} - implementation({{ classpath }}) -{%- endif -%} -{%- else %} - api({{ classpath }}) -{%- endif -%} -{%- if library.excludes.consumer is defined %} { -{% for exclude in library.excludes.consumer if exclude.classpath -%} -{%- set classpath = exclude.classpath|replace('"','') -%} -{%- set classpath_parts = split(classpath, ':') -%} - exclude(group = "{{ classpath_parts[0] }}", module = "{{ classpath_parts[1] }}") -{% endfor -%} - } -{%- endif -%} -{%- endif -%} -{%- endfor -%} - -{{ AnnotationProcessors("annotationProcessor", target.use_annotation_processor) }} +{%- macro AddFileDeps(file_deps) -%} +{%- for file_dep in file_deps %} + "$arcadia_root/{{ file_dep.jar }}"{%- if not loop.last -%},{%- endif -%} +{%- endfor -%} +{%- endmacro -%} -{%- for extra_target in extra_targets -%} -{%- for library in extra_target.consumer if library.classpath -%} -{%- if library.prebuilt and library.jar and (library.type != "contrib" or build_contribs) %} - testImplementation(files("$arcadia_root/{{ library.jar }}")) -{%- else -%} -{%- set classpath = library.classpath -%} +{%- macro AddNonFileDeps(current_target, file_classpaths, implementationFunc, apiFunc) -%} +{%- for library in current_target.consumer if library.classpath -%} +{%- set classpath = library.classpath -%} +{%- if file_classpaths|select('eq', classpath)|length == 0 -%} {%- if classpath|replace('"','') == classpath -%} {%- set classpath = '"' + classpath + '"' -%} -{%- endif %} +{%- endif -%} {%- include "[generator]/patch_classpath.jinja" -%} -{%- if library.type != "contrib" and library.testdep -%} -{%- set classpath = '":' + library.testdep | replace("/", ":") + '"' -%} -{%- include "[generator]/patch_classpath.jinja" %} - testImplementation(project(path = {{ classpath }}, configuration = "testArtifacts")) +{%- if library.type != "contrib" -%} +{%- if library.testdep -%} +{%- set classpath = '":' + library.testdep | replace("/", ":") + '"' -%} +{%- include "[generator]/patch_classpath.jinja" %} + {{ implementationFunc }}(project(path = {{ classpath }}, configuration = "testArtifacts")) +{%- else %} + {{ implementationFunc }}({{ classpath }}) +{%- endif -%} {%- else %} - testImplementation({{ classpath }}) + {{ apiFunc }}({{ classpath }}) {%- endif -%} -{%- if library.excludes.consumer is defined %} { -{% for exclude in library.excludes.consumer if exclude.classpath -%} +{%- if library.excludes.consumer|length -%} { +{%- for exclude in library.excludes.consumer if exclude.classpath -%} {%- set classpath = exclude.classpath|replace('"','') -%} -{%- set classpath_parts = split(classpath, ':') -%} +{%- set classpath_parts = split(classpath, ':') %} exclude(group = "{{ classpath_parts[0] }}", module = "{{ classpath_parts[1] }}") -{% endfor -%} +{%- endfor %} } {%- endif -%} {%- endif -%} {%- endfor -%} +{%- endmacro -%} + +{%- set file_deps = target.consumer|selectattr('classpath')|selectattr('jar')|selectattr('prebuilt', 'eq', true) -%} +{%- if not build_contribs -%} +{%- set file_deps = file_deps|selectattr('type', 'ne', 'contrib') -%} +{%- endif -%} +{%- set file_classpaths = file_deps|map(attribute='classpath') -%} + +{%- set test_file_deps = extra_targets|selectattr('consumer')|map(attribute='consumer')|sum|selectattr('classpath')|selectattr('jar')|selectattr('prebuilt', 'eq', true) -%} +{%- if not build_contribs -%} +{%- set test_file_deps = test_file_deps|selectattr('type', 'ne', 'contrib') -%} +{%- endif -%} +{%- set test_file_classpaths = test_file_deps|map(attribute='classpath') -%} + +dependencies { +{%- if has_errorprone -%} +{%- set errorprones = target.consumer|selectattr('classpath')|selectattr('jar', 'startsWith', 'contrib/java/com/google/errorprone/error_prone_annotations') -%} +{%- if errorprones|length -%} +{%- for errorprone in errorprones -%} +{%- set errorprone_version = library.jar|replace("contrib/java/com/google/errorprone/error_prone_annotations/", "") -%} +{%- set errorprone_parts = split(errorprone_version, '/', 2) %} + errorprone("com.google.errorprone:error_prone_core:{{ errorprone_parts[0] }}") +{%- endfor -%} +{%- endif -%} +{%- endif -%} +{#- glue -#} +{{ AnnotationProcessors("annotationProcessor", target.use_annotation_processor) }} +{%- for extra_target in extra_targets -%} {{ AnnotationProcessors("testAnnotationProcessor", extra_target.use_annotation_processor) }} -{%- endfor %} +{%- endfor -%} +{#- glue -#} +{{ AddNonFileDeps(target, file_classpaths, "implementation", "api") }} +{%- for extra_target in extra_targets -%} +{{ AddNonFileDeps(extra_target, test_file_classpaths, "testImplementation", "testImplementation") }} +{%- endfor -%} + +{%- if file_deps|length %} + implementation(files(listOf({#- glue -#} +{{ AddFileDeps(file_deps) }} + ))) +{%- endif -%} + +{%- if test_file_deps|length %} + testImplementation(files(listOf({#- glue -#} +{{ AddFileDeps(test_file_deps) }} + ))) +{%- endif %} } diff --git a/build/export_generators/ide-gradle/patch_classpath.jinja b/build/export_generators/ide-gradle/patch_classpath.jinja index c653e7b1e06..eb354aa20d3 100644 --- a/build/export_generators/ide-gradle/patch_classpath.jinja +++ b/build/export_generators/ide-gradle/patch_classpath.jinja @@ -1,3 +1,3 @@ {%- if common_dir_classpath -%} -{%- set classpath = classpath|replace(common_dir_classpath, '"') -%} +{%- set classpath = classpath|replace(common_dir_classpath, '"')|replace('""', '":"') -%} {%- endif -%} diff --git a/build/mapping.conf.json b/build/mapping.conf.json index 15bcafa1f49..5bcc369f1c9 100644 --- a/build/mapping.conf.json +++ b/build/mapping.conf.json @@ -531,6 +531,7 @@ "8317487990": "{registry_endpoint}/8317487990", "8330113388": "{registry_endpoint}/8330113388", "8444524403": "{registry_endpoint}/8444524403", + "8533025565": "{registry_endpoint}/8533025565", "5486731632": "{registry_endpoint}/5486731632", "5514350352": "{registry_endpoint}/5514350352", "5514360398": "{registry_endpoint}/5514360398", @@ -1898,6 +1899,7 @@ "8317487990": "devtools/ya/test/programs/test_tool/bin/test_tool for linux", "8330113388": "devtools/ya/test/programs/test_tool/bin/test_tool for linux", "8444524403": "devtools/ya/test/programs/test_tool/bin/test_tool for linux", + "8533025565": "devtools/ya/test/programs/test_tool/bin/test_tool for linux", "5486731632": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux", "5514350352": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux", "5514360398": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux", diff --git a/build/platform/test_tool/host.ya.make.inc b/build/platform/test_tool/host.ya.make.inc index 6409e58cecf..fcf673eaa62 100644 --- a/build/platform/test_tool/host.ya.make.inc +++ b/build/platform/test_tool/host.ya.make.inc @@ -1,12 +1,12 @@ IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444533975) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8533025279) ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444533039) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8533022779) ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444535565) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8533029812) ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444532385) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8533020581) ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444534653) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8533027766) ENDIF() diff --git a/build/platform/test_tool/host_os.ya.make.inc b/build/platform/test_tool/host_os.ya.make.inc index 3f9e51b86fe..2edf644879f 100644 --- a/build/platform/test_tool/host_os.ya.make.inc +++ b/build/platform/test_tool/host_os.ya.make.inc @@ -1,12 +1,12 @@ IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444523542) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8533022493) ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444522906) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8533020676) ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444524403) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8533025565) ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444522360) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8533018636) ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444524083) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8533023853) ENDIF() diff --git a/build/plugins/nots.py b/build/plugins/nots.py index 3d5122b6285..52ff04a8296 100644 --- a/build/plugins/nots.py +++ b/build/plugins/nots.py @@ -321,8 +321,9 @@ def _build_directives(flags: list[str] | tuple[str], paths: list[str]) -> str: def _build_cmd_input_paths(paths: list[str] | tuple[str], hide=False, disable_include_processor=False): hide_part = "hide" if hide else "" disable_ip_part = "context=TEXT" if disable_include_processor else "" + input_part = "input=TEXT" if disable_include_processor else "input" - return _build_directives([hide_part, disable_ip_part, "input"], paths) + return _build_directives([hide_part, disable_ip_part, input_part], paths) def _build_cmd_output_paths(paths: list[str] | tuple[str], hide=False): diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py index f45239106df..d254ad0a95a 100644 --- a/build/plugins/pybuild.py +++ b/build/plugins/pybuild.py @@ -589,7 +589,7 @@ def onpy_srcs(unit, *args): root_rel_path = rootrel_arc_src(path, unit) if with_py: key = '/py_modules/' + mod - res += [path, key, '-', 'resfs/src/{}=${{rootrel;context=TEXT;input:"{}"}}'.format(key, path)] + res += [path, key, '-', 'resfs/src/{}=${{rootrel;context=TEXT;input=TEXT:"{}"}}'.format(key, path)] if with_pyc: src = unit.resolve_arc_path(path) or path dst = path + uniq_suffix(path, unit) diff --git a/build/plugins/res.py b/build/plugins/res.py index db931b4a499..b06a690c24c 100644 --- a/build/plugins/res.py +++ b/build/plugins/res.py @@ -66,7 +66,7 @@ def onresource_files(unit, *args): ) continue if not ugly_conftest_exception(path): - src = 'resfs/src/{}=${{rootrel;input;context=TEXT:"{}"}}'.format(key, path) + src = 'resfs/src/{}=${{rootrel;context=TEXT;input=TEXT:"{}"}}'.format(key, path) else: src = 'resfs/src/{}={}'.format(key, rootrel_arc_src(path, unit)) res += ['-', src, path, key] diff --git a/build/ymake.core.conf b/build/ymake.core.conf index 18ad281440f..9ab27e3edfe 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -2614,7 +2614,7 @@ macro ADD_COMPILABLE_TRANSLIT(TranslitTable, NGrams, Name, Options...) { _COPY_FILE_CONTEXT=TEXT macro _COPY_FILE_IMPL(TEXT[], AUTO_DST="", NOAUTO_DST="", OUTPUT_INCLUDES[], INDUCED_DEPS[], OUTPUT_INCLUDES_INP[], FILE...) { - .CMD=$COPY_CMD ${input:FILE} ${context=TEXT;input:TEXT} ${output:AUTO_DST} ${noauto;output:NOAUTO_DST} ${hide;output_include:OUTPUT_INCLUDES} ${hide;from_input;output_include:OUTPUT_INCLUDES_INP} $INDUCED_DEPS ${hide;kv:"p CP"} ${hide;kv:"pc light-cyan"} + .CMD=$COPY_CMD ${input:FILE} ${context=TEXT;input=TEXT:TEXT} ${output:AUTO_DST} ${noauto;output:NOAUTO_DST} ${hide;output_include:OUTPUT_INCLUDES} ${hide;from_input;output_include:OUTPUT_INCLUDES_INP} $INDUCED_DEPS ${hide;kv:"p CP"} ${hide;kv:"pc light-cyan"} .SEM=target_commands-ITEM && target_commands-macro copy_file && target_commands-args ${input:FILE} ${output:AUTO_DST} ${noauto;output:NOAUTO_DST} } @@ -2780,7 +2780,7 @@ macro SIZE(Type) { ### This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only. ### You should specify file name with the extension as Out. Further processing will be done according this extension. macro JOIN_SRCS(Out, Src...) { - .CMD=$YMAKE_PYTHON3 ${input:"build/scripts/gen_join_srcs.py"} ${hide;input:"build/scripts/process_command_files.py"} ${output:Out} --ya-start-command-file ${rootrel;context=TEXT;input:Src} --ya-end-command-file ${hide;from_input;output_include:Src} ${hide;kv:"p JS"} ${hide;kv:"pc magenta"} + .CMD=$YMAKE_PYTHON3 ${input:"build/scripts/gen_join_srcs.py"} ${hide;input:"build/scripts/process_command_files.py"} ${output:Out} --ya-start-command-file ${rootrel;context=TEXT;input=TEXT:Src} --ya-end-command-file ${hide;from_input;output_include:Src} ${hide;kv:"p JS"} ${hide;kv:"pc magenta"} .SEM=target_macroses-ITEM && target_macroses-macro target_joined_source && target_macroses-args $Out ${input:Src} ${hide;output;suf=.o:Out} ${hide;input:"build/scripts/gen_join_srcs.py"} ${hide;input:"build/scripts/process_command_files.py"} _CONDITIONAL_SRCS($TIDY_VALUE $Src) } @@ -2791,7 +2791,7 @@ macro JOIN_SRCS(Out, Src...) { ### This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only. ### You should specify file name with the extension as Out. Further processing will be done according to this extension. macro JOIN_SRCS_GLOBAL(Out, Src...) { - .CMD=$YMAKE_PYTHON3 ${input:"build/scripts/gen_join_srcs.py"} ${hide;input:"build/scripts/process_command_files.py"} ${noauto;output:Out} --ya-start-command-file ${rootrel;input;context=TEXT:Src} --ya-end-command-file ${hide;from_input;output_include:Src} ${hide;kv:"p JS"} ${hide;kv:"pc magenta"} + .CMD=$YMAKE_PYTHON3 ${input:"build/scripts/gen_join_srcs.py"} ${hide;input:"build/scripts/process_command_files.py"} ${noauto;output:Out} --ya-start-command-file ${rootrel;context=TEXT;input=TEXT:Src} --ya-end-command-file ${hide;from_input;output_include:Src} ${hide;kv:"p JS"} ${hide;kv:"pc magenta"} SRCS(GLOBAL $Out) } @@ -2801,7 +2801,7 @@ macro JOIN_SRCS_GLOBAL(Out, Src...) { ### This macro places all files into single file, so will work with any sources. ### You should specify file name with the extension as Out. Further processing will be done according to this extension. macro FLAT_JOIN_SRCS_GLOBAL(Out, Src...) { - .CMD=$FS_TOOLS cat ${noauto;output:Out} --ya-start-command-file ${context=TEXT;input:Src} --ya-end-command-file ${hide;from_input;output_include:Src} ${hide;kv:"p JS"} ${hide;kv:"pc magenta"} + .CMD=$FS_TOOLS cat ${noauto;output:Out} --ya-start-command-file ${context=TEXT;input=TEXT:Src} --ya-end-command-file ${hide;from_input;output_include:Src} ${hide;kv:"p JS"} ${hide;kv:"pc magenta"} SRCS(GLOBAL $Out) } @@ -3158,7 +3158,7 @@ macro AR_PLUGIN(name) { ### Script will receive all arguments to link_exe.py, and can output into stdout preprocessed list ### of all arguments, in JSON format macro LD_PLUGIN(Name) { - .CMD=$COPY_CMD ${context=TEXT;input:Name} ${global;noauto;output;suf=.pyplugin:Name} + .CMD=$COPY_CMD ${context=TEXT;input=TEXT:Name} ${global;noauto;output;suf=.pyplugin:Name} .SEM=_SEM_IGNORED } @@ -3992,7 +3992,7 @@ DECIMAL_MD5_FIXED= ### Generates .cpp file <fileName> with one defined function 'const char* <funcName>() { return "<calculated_md5_hash>"; }'. ### <calculated_md5_hash> will be md5 hash for all inputs passed to this macro. macro DECIMAL_MD5_LOWER_32_BITS(File, FUNCNAME="", Opts...) { - .CMD=$YMAKE_PYTHON ${input:DECIMAL_MD5_SCRIPT} --fixed-output=${DECIMAL_MD5_FIXED} --func-name=${FUNCNAME} --lower-bits 32 --source-root=$ARCADIA_ROOT ${context=TEXT;input:Opts} ${stdout;output:File} ${hide;kv:"p SV"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"} + .CMD=$YMAKE_PYTHON ${input:DECIMAL_MD5_SCRIPT} --fixed-output=${DECIMAL_MD5_FIXED} --func-name=${FUNCNAME} --lower-bits 32 --source-root=$ARCADIA_ROOT ${context=TEXT;input=TEXT:Opts} ${stdout;output:File} ${hide;kv:"p SV"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"} } # tag:internal @@ -4530,8 +4530,8 @@ macro DECLARE_IN_DIRS(var_prefix, PATTERN, SRCDIR="", RECURSIVE?"**/":"", EXCLUD ### ${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). 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=custom_runs-ITEM && custom_runs-depends ${input:IN} ${context=TEXT;input:IN_NOPARSE} ${tool:Tool} ${tool:TOOL} ${pre=&& custom_runs-env :ENV} && custom_runs-command ${tool:Tool} $Args ${pre=> :STDOUT} ${pre=> :STDOUT_NOAUTO} && custom_runs-outputs ${output:OUT} ${noauto;output:OUT_NOAUTO} ${output:STDOUT} ${noauto;output:STDOUT_NOAUTO} ${pre=&& custom_runs-cwd :CWD} + .CMD=${cwd:CWD} ${env:ENV} ${tool:Tool} $Args ${hide;input:IN} ${hide;context=TEXT;input=TEXT: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=custom_runs-ITEM && custom_runs-depends ${input:IN} ${context=TEXT;input=TEXT:IN_NOPARSE} ${tool:Tool} ${tool:TOOL} ${pre=&& custom_runs-env :ENV} && custom_runs-command ${tool:Tool} $Args ${pre=> :STDOUT} ${pre=> :STDOUT_NOAUTO} && custom_runs-outputs ${output:OUT} ${noauto;output:OUT_NOAUTO} ${output:STDOUT} ${noauto;output:STDOUT_NOAUTO} ${pre=&& custom_runs-cwd :CWD} } # tag:lua-specific @@ -4556,7 +4556,7 @@ macro RUN_PROGRAM(Tool, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_NOA ### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or ### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used. macro RUN_LUA(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} $LUA_TOOL ${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 LU"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"} + .CMD=${cwd:CWD} ${env:ENV} $LUA_TOOL ${input:ScriptPath} $Args ${hide;input:IN} ${hide;context=TEXT;input=TEXT: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 LU"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"} } # tag:python-specific @@ -4582,8 +4582,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. macro RUN_PYTHON3(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUT_GLOBAL{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} ${hide;global;output:OUT_GLOBAL} ${stdout;output:STDOUT} ${stdout;noauto;output:STDOUT_NOAUTO} ${hide;kv:"p PY"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"} - .SEM=custom_runs-ITEM && custom_runs-depends ${input:IN} ${context=TEXT;input:IN_NOPARSE} ${input:ScriptPath} ${tool:TOOL} ${pre=&& custom_runs-env :ENV} && custom_runs-command python3 ${input:ScriptPath} $Args ${pre=> :STDOUT} ${pre=> :STDOUT_NOAUTO} && custom_runs-outputs ${output:OUT} ${noauto;output:OUT_NOAUTO} ${global;output:OUT_GLOBAL} ${output:STDOUT} ${noauto;output:STDOUT_NOAUTO} ${pre=&& custom_runs-cwd :CWD} && custom_runs-cmake_packages-ITEM && custom_runs-cmake_packages-name Python3 + .CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON3 ${input:ScriptPath} $Args ${hide;input:IN} ${hide;context=TEXT;input=TEXT:IN_NOPARSE} ${hide;output_include:OUTPUT_INCLUDES} $INDUCED_DEPS ${hide;tool:TOOL} ${hide;output:OUT} ${hide;noauto;output:OUT_NOAUTO} ${hide;global;output:OUT_GLOBAL} ${stdout;output:STDOUT} ${stdout;noauto;output:STDOUT_NOAUTO} ${hide;kv:"p PY"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"} + .SEM=custom_runs-ITEM && custom_runs-depends ${input:IN} ${context=TEXT;input=TEXT:IN_NOPARSE} ${input:ScriptPath} ${tool:TOOL} ${pre=&& custom_runs-env :ENV} && custom_runs-command python3 ${input:ScriptPath} $Args ${pre=> :STDOUT} ${pre=> :STDOUT_NOAUTO} && custom_runs-outputs ${output:OUT} ${noauto;output:OUT_NOAUTO} ${global;output:OUT_GLOBAL} ${output:STDOUT} ${noauto;output:STDOUT_NOAUTO} ${pre=&& custom_runs-cwd :CWD} && custom_runs-cmake_packages-ITEM && custom_runs-cmake_packages-name Python3 } ### @usage: RUN_PY3_PROGRAM(tool_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN[_NOPARSE] inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [INDUCED_DEPS $VARs...]) @@ -4617,7 +4617,7 @@ macro RUN_PY3_PROGRAM(Tool, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT # tag:java-specific 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", 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/;suf=.py:HIDE_OUTPUT} $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"} + .CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON ${input;pre=build/scripts/;suf=.py:HIDE_OUTPUT} $JDK_RESOURCE/bin/java $JAR $Args ${hide;tool:TOOL} ${hide;input:IN} ${hide;context=TEXT;input=TEXT: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"} .SEM=custom_runs-ITEM && custom_runs-depends ${input:IN} && custom_runs-command $SEM && custom_runs-command $Args && custom_runs-outputs ${output:OUT} ${noauto;output:OUT_NOAUTO} ${pre=&& custom_runs-cwd :CWD} } @@ -5856,7 +5856,7 @@ macro HEADERS(EXCLUDE[], Dirs...) { ### - CWD - path to the working directory of the Tool ### Note: Generated AST files generated into BINDIR according to corresponding .cpp file names listed in SOURCES parameter. macro CLANG_EMIT_AST_CXX_RUN_TOOL(SOURCES[], OPTS[], 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:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_RESOURCE_GLOBAL}/bin/clang++ ${pre=-I:_C__INCLUDE} $CXXFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS -emit-ast -c ${input:SOURCES} ${hide;tmp;suf=.ast;noext;nopath:SOURCES} $OPTS ${hide;kv:"p ST"} ${hide;kv:"pc light-green"} && ${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"} + .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_RESOURCE_GLOBAL}/bin/clang++ ${pre=-I:_C__INCLUDE} $CXXFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS -emit-ast -c ${input:SOURCES} ${hide;tmp;suf=.ast;noext;nopath:SOURCES} $OPTS ${hide;kv:"p ST"} ${hide;kv:"pc light-green"} && ${cwd:CWD} ${env:ENV} ${tool:Tool} $Args ${hide;input:IN} ${hide;context=TEXT;input=TEXT: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"} PEERDIR(build/platform/clang) } diff --git a/contrib/python/allure-pytest/.dist-info/METADATA b/contrib/python/allure-pytest/.dist-info/METADATA index 475b8580875..069d5d6901e 100644 --- a/contrib/python/allure-pytest/.dist-info/METADATA +++ b/contrib/python/allure-pytest/.dist-info/METADATA @@ -1,6 +1,6 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.4 Name: allure-pytest -Version: 2.13.5 +Version: 2.14.0 Summary: Allure pytest integration Home-page: https://allurereport.org/ Author: Qameta Software Inc., Stanislav Seliverstov @@ -17,15 +17,26 @@ Classifier: Topic :: Software Development :: Quality Assurance Classifier: Topic :: Software Development :: Testing Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Description-Content-Type: text/markdown -Requires-Dist: pytest >=4.5.0 -Requires-Dist: allure-python-commons ==2.13.5 +Requires-Dist: pytest>=4.5.0 +Requires-Dist: allure-python-commons==2.14.0 +Dynamic: author +Dynamic: author-email +Dynamic: classifier +Dynamic: description +Dynamic: description-content-type +Dynamic: home-page +Dynamic: keywords +Dynamic: license +Dynamic: project-url +Dynamic: requires-dist +Dynamic: summary ## Allure Pytest Plugin diff --git a/contrib/python/allure-pytest/ya.make b/contrib/python/allure-pytest/ya.make index 68c2880e5d2..f3530d05674 100644 --- a/contrib/python/allure-pytest/ya.make +++ b/contrib/python/allure-pytest/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(2.13.5) +VERSION(2.14.0) LICENSE(Apache-2.0) diff --git a/contrib/python/allure-python-commons/.dist-info/METADATA b/contrib/python/allure-python-commons/.dist-info/METADATA index 94cd97681a8..b79879133e7 100644 --- a/contrib/python/allure-python-commons/.dist-info/METADATA +++ b/contrib/python/allure-python-commons/.dist-info/METADATA @@ -1,7 +1,7 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.4 Name: allure-python-commons -Version: 2.13.5 -Summary: ('Contains the API for end users as well as helper functions and classes to build Allure adapters for Python test frameworks',) +Version: 2.14.0 +Summary: Contains the API for end users as well as helper functions and classes to build Allure adapters for Python test frameworks Home-page: https://allurereport.org/ Author: Qameta Software Inc., Stanislav Seliverstov Author-email: sseliverstov@qameta.io @@ -15,16 +15,28 @@ Classifier: Topic :: Software Development :: Quality Assurance Classifier: Topic :: Software Development :: Testing Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Requires-Python: >=3.6 Description-Content-Type: text/markdown -Requires-Dist: attrs >=16.0.0 -Requires-Dist: pluggy >=0.4.0 +Requires-Dist: attrs>=16.0.0 +Requires-Dist: pluggy>=0.4.0 +Dynamic: author +Dynamic: author-email +Dynamic: classifier +Dynamic: description +Dynamic: description-content-type +Dynamic: home-page +Dynamic: keywords +Dynamic: license +Dynamic: project-url +Dynamic: requires-dist +Dynamic: requires-python +Dynamic: summary ## Allure Common API diff --git a/contrib/python/allure-python-commons/allure.py b/contrib/python/allure-python-commons/allure/__init__.py index 4acb83e37a3..c30329a6e8a 100644 --- a/contrib/python/allure-python-commons/allure.py +++ b/contrib/python/allure-python-commons/allure/__init__.py @@ -3,7 +3,7 @@ from allure_commons._allure import description, description_html from allure_commons._allure import label from allure_commons._allure import severity from allure_commons._allure import tag -from allure_commons._allure import id +from allure_commons._allure import id # noqa: A004 from allure_commons._allure import suite, parent_suite, sub_suite from allure_commons._allure import epic, feature, story from allure_commons._allure import link, issue, testcase diff --git a/contrib/python/allure-python-commons/allure/py.typed b/contrib/python/allure-python-commons/allure/py.typed new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/contrib/python/allure-python-commons/allure/py.typed diff --git a/contrib/python/allure-python-commons/allure_commons/_allure.py b/contrib/python/allure-python-commons/allure_commons/_allure.py index 05e01dbd4be..b7bbe2a5e07 100644 --- a/contrib/python/allure-python-commons/allure_commons/_allure.py +++ b/contrib/python/allure-python-commons/allure_commons/_allure.py @@ -1,5 +1,5 @@ from functools import wraps -from typing import Any, Callable, TypeVar +from typing import Any, Callable, TypeVar, Union, overload from allure_commons._core import plugin_manager from allure_commons.types import LabelType, LinkType, ParameterMode @@ -133,7 +133,7 @@ class Dynamic: plugin_manager.hook.add_link(url=url, link_type=link_type, name=name) @staticmethod - def parameter(name, value, excluded=None, mode: ParameterMode = None): + def parameter(name, value, excluded=None, mode: Union[ParameterMode, None] = None): plugin_manager.hook.add_parameter(name=name, value=value, excluded=excluded, mode=mode) @staticmethod @@ -161,6 +161,16 @@ class Dynamic: return Dynamic.label(LabelType.MANUAL, True) +@overload +def step(title: str) -> "StepContext": + ... + + +@overload +def step(title: _TFunc) -> _TFunc: + ... + + def step(title): if callable(title): return StepContext(title.__name__, {})(title) @@ -191,7 +201,7 @@ class StepContext: with StepContext(self.title.format(*args, **params), params): return func(*a, **kw) - return impl + return impl # type: ignore class Attach: diff --git a/contrib/python/allure-python-commons/allure_commons/logger.py b/contrib/python/allure-python-commons/allure_commons/logger.py index d0ac1e2491b..55f956f2507 100644 --- a/contrib/python/allure-python-commons/allure_commons/logger.py +++ b/contrib/python/allure-python-commons/allure_commons/logger.py @@ -15,7 +15,7 @@ class AllureFileLogger: def __init__(self, report_dir, clean=False): self._report_dir = Path(report_dir).absolute() if self._report_dir.is_dir() and clean: - shutil.rmtree(self._report_dir) + shutil.rmtree(self._report_dir, ignore_errors=True) self._report_dir.mkdir(parents=True, exist_ok=True) def _report_item(self, item): diff --git a/contrib/python/allure-python-commons/allure_commons/model2.py b/contrib/python/allure-python-commons/allure_commons/model2.py index e8fd330a0b0..ccaf4459d6a 100644 --- a/contrib/python/allure-python-commons/allure_commons/model2.py +++ b/contrib/python/allure-python-commons/allure_commons/model2.py @@ -53,7 +53,7 @@ class TestResult(ExecutableItem): @attrs class TestStepResult(ExecutableItem): - id = attrib(default=None) + id = attrib(default=None) # noqa: A003 @attrs @@ -82,7 +82,7 @@ class Label: @attrs class Link: - type = attrib(default=None) + type = attrib(default=None) # noqa: A003 url = attrib(default=None) name = attrib(default=None) @@ -99,7 +99,7 @@ class StatusDetails: class Attachment: name = attrib(default=None) source = attrib(default=None) - type = attrib(default=None) + type = attrib(default=None) # noqa: A003 class Status: diff --git a/contrib/python/allure-python-commons/allure_commons/py.typed b/contrib/python/allure-python-commons/allure_commons/py.typed new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/contrib/python/allure-python-commons/allure_commons/py.typed diff --git a/contrib/python/allure-python-commons/allure_commons/types.py b/contrib/python/allure-python-commons/allure_commons/types.py index 06b77dfa151..e631e427c60 100644 --- a/contrib/python/allure-python-commons/allure_commons/types.py +++ b/contrib/python/allure-python-commons/allure_commons/types.py @@ -53,7 +53,7 @@ class AttachmentType(Enum): PNG = ("image/png", "png") JPG = ("image/jpg", "jpg") - SVG = ("image/svg-xml", "svg") + SVG = ("image/svg+xml", "svg") GIF = ("image/gif", "gif") BMP = ("image/bmp", "bmp") TIFF = ("image/tiff", "tiff") diff --git a/contrib/python/allure-python-commons/ya.make b/contrib/python/allure-python-commons/ya.make index 7f3ae9bda73..65be7572db6 100644 --- a/contrib/python/allure-python-commons/ya.make +++ b/contrib/python/allure-python-commons/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(2.13.5) +VERSION(2.14.0) LICENSE(Apache-2.0) @@ -15,7 +15,7 @@ NO_LINT() PY_SRCS( TOP_LEVEL - allure.py + allure/__init__.py allure_commons/__init__.py allure_commons/_allure.py allure_commons/_core.py @@ -33,6 +33,8 @@ RESOURCE_FILES( PREFIX contrib/python/allure-python-commons/ .dist-info/METADATA .dist-info/top_level.txt + allure/py.typed + allure_commons/py.typed ) END() diff --git a/contrib/python/argcomplete/py3/.dist-info/METADATA b/contrib/python/argcomplete/py3/.dist-info/METADATA index 8eff29ade2e..c8d45d5d152 100644 --- a/contrib/python/argcomplete/py3/.dist-info/METADATA +++ b/contrib/python/argcomplete/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: argcomplete -Version: 3.6.1 +Version: 3.6.2 Summary: Bash tab completion for argparse Project-URL: Homepage, https://github.com/kislyuk/argcomplete Project-URL: Documentation, https://kislyuk.github.io/argcomplete diff --git a/contrib/python/argcomplete/py3/argcomplete/bash_completion.d/_python-argcomplete b/contrib/python/argcomplete/py3/argcomplete/bash_completion.d/_python-argcomplete index 8a91272dea4..81c9d41f803 100644 --- a/contrib/python/argcomplete/py3/argcomplete/bash_completion.d/_python-argcomplete +++ b/contrib/python/argcomplete/py3/argcomplete/bash_completion.d/_python-argcomplete @@ -124,12 +124,6 @@ __python_argcomplete_which() { _python_argcomplete_global() { if [[ -n "${ZSH_VERSION-}" ]]; then - if [[ "${_matcher_num-}" -gt 1 ]]; then - # Return early if the completer is called multiple times in the same completion run. - # Currently the only known occurrence of this is in zsh when a matcher-list zstyle is declared. - # When this happens, _matcher_num is incremented past 1. - return - fi # Store result of a regex match in the # BASH_REMATCH variable rather than MATCH setopt local_options BASH_REMATCH diff --git a/contrib/python/argcomplete/py3/argcomplete/scripts/activate_global_python_argcomplete.py b/contrib/python/argcomplete/py3/argcomplete/scripts/activate_global_python_argcomplete.py index 299d081c0ea..8e7d27de6cd 100644 --- a/contrib/python/argcomplete/py3/argcomplete/scripts/activate_global_python_argcomplete.py +++ b/contrib/python/argcomplete/py3/argcomplete/scripts/activate_global_python_argcomplete.py @@ -121,10 +121,12 @@ def append_to_config_file(path, shellcode): fh.write(shellcode) print("Added.", file=sys.stderr) + def link_zsh_user_rcfile(zsh_fpath=None): zsh_rcfile = os.path.join(os.path.expanduser(os.environ.get("ZDOTDIR", "~")), ".zshenv") append_to_config_file(zsh_rcfile, zsh_shellcode.format(zsh_fpath=zsh_fpath or get_activator_dir())) + def link_bash_user_rcfile(): bash_completion_user_file = os.path.expanduser("~/.bash_completion") append_to_config_file(bash_completion_user_file, bash_shellcode.format(activator=get_activator_path())) @@ -135,6 +137,7 @@ def link_user_rcfiles(): link_zsh_user_rcfile() link_bash_user_rcfile() + def add_zsh_system_dir_to_fpath_for_user(): if "zsh" not in os.environ.get("SHELL", ""): return @@ -148,6 +151,7 @@ def add_zsh_system_dir_to_fpath_for_user(): except (FileNotFoundError, subprocess.CalledProcessError): pass + def main(): global args args = parser.parse_args() diff --git a/contrib/python/argcomplete/py3/argcomplete/shell_integration.py b/contrib/python/argcomplete/py3/argcomplete/shell_integration.py index cac48902fa7..3d592dc0ab8 100644 --- a/contrib/python/argcomplete/py3/argcomplete/shell_integration.py +++ b/contrib/python/argcomplete/py3/argcomplete/shell_integration.py @@ -34,12 +34,6 @@ _python_argcomplete%(function_suffix)s() { local IFS=$'\013' local script="%(argcomplete_script)s" if [[ -n "${ZSH_VERSION-}" ]]; then - if [[ "${_matcher_num-}" -gt 1 ]]; then - # Return early if the completer is called multiple times in the same completion run. - # Currently the only known occurrence of this is in zsh when a matcher-list zstyle is declared. - # When this happens, _matcher_num is incremented past 1. - return - fi local completions completions=($(IFS="$IFS" \ COMP_LINE="$BUFFER" \ diff --git a/contrib/python/argcomplete/py3/ya.make b/contrib/python/argcomplete/py3/ya.make index 327bc4e34ed..6d1fd084471 100644 --- a/contrib/python/argcomplete/py3/ya.make +++ b/contrib/python/argcomplete/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(3.6.1) +VERSION(3.6.2) LICENSE(Apache-2.0) @@ -39,33 +39,33 @@ REGISTRY_ENDPOINT = os.environ.get("YA_REGISTRY_ENDPOINT", "https://devtools-reg PLATFORM_MAP = { "data": { "win32": { - "md5": "c30b4f739d1944c432a4516cc8173422", + "md5": "3452c1706f37bf62d994367bd7f8aafc", "urls": [ - f"{REGISTRY_ENDPOINT}/8444538684" + f"{REGISTRY_ENDPOINT}/8533019849" ] }, "darwin": { - "md5": "ae118af75bd2cb6a07c0063163a154ed", + "md5": "36940fce519b798318789559b417f42a", "urls": [ - f"{REGISTRY_ENDPOINT}/8444538171" + f"{REGISTRY_ENDPOINT}/8533017016" ] }, "darwin-arm64": { - "md5": "3801ef527de1d1283f29d17b771cfe51", + "md5": "bd7edc55492f139ed39555e1a7a56be7", "urls": [ - f"{REGISTRY_ENDPOINT}/8444536931" + f"{REGISTRY_ENDPOINT}/8533014682" ] }, "linux-aarch64": { - "md5": "75c1f0a0272d4988d13e4a62594750a9", + "md5": "236ab9d8eb2f2fa3e115ef73af768973", "urls": [ - f"{REGISTRY_ENDPOINT}/8444536175" + f"{REGISTRY_ENDPOINT}/8533012028" ] }, "linux": { - "md5": "b1df6e5f2eea9923b6aab468b21c5935", + "md5": "e098353fa2ec7baa39d956e3f1d23c7e", "urls": [ - f"{REGISTRY_ENDPOINT}/8444539167" + f"{REGISTRY_ENDPOINT}/8533022295" ] } } diff --git a/yql/essentials/core/common_opt/yql_co.h b/yql/essentials/core/common_opt/yql_co.h index 027fb26f0a2..451db6ccad4 100644 --- a/yql/essentials/core/common_opt/yql_co.h +++ b/yql/essentials/core/common_opt/yql_co.h @@ -10,6 +10,7 @@ namespace NYql { struct TOptimizeContext { TTypeAnnotationContext* Types = nullptr; TParentsMap* ParentsMap = nullptr; + bool ForPeephole = false; const TExprNode* GetParentIfSingle(const TExprNode& node) const { YQL_ENSURE(ParentsMap); diff --git a/yql/essentials/core/common_opt/yql_co_flow2.cpp b/yql/essentials/core/common_opt/yql_co_flow2.cpp index 8ebb5243ffa..ee0a9074f18 100644 --- a/yql/essentials/core/common_opt/yql_co_flow2.cpp +++ b/yql/essentials/core/common_opt/yql_co_flow2.cpp @@ -261,13 +261,13 @@ TExprNode::TPtr RenameJoinTree(TExprNode::TPtr joinTree, const THashMap<TString, return ret; } -TExprNode::TPtr ReassembleJoinEquality(TExprNode::TPtr columns, const TStringBuf& upstreamLabel, +TExprNode::TPtr ReassembleJoinEquality(TExprNode::TPtr columns, const THashSet<TStringBuf>& upstreamLabels, const THashMap<TString, TString>& upstreamTablesRename, const THashMap<TString, TString>& upstreamColumnsBackRename, TExprContext& ctx) { TExprNode::TListType newChildren(columns->ChildrenList()); for (ui32 i = 0; i < columns->ChildrenSize(); i += 2) { - if (columns->Child(i)->Content() != upstreamLabel) { + if (!upstreamLabels.contains(columns->Child(i)->Content())) { continue; } @@ -280,14 +280,16 @@ TExprNode::TPtr ReassembleJoinEquality(TExprNode::TPtr columns, const TStringBuf upstreamTablesRename, ctx); newChildren[i + 1] = ctx.NewAtom(columns->Pos(), part2); } else { - TStringBuf part1; - TStringBuf part2; - SplitTableName(column->Content(), part1, part2); + TStringBuf part1 = columns->Child(i)->Content(); + TStringBuf part2 = columns->Child(i + 1)->Content(); + + if (TString(column->Content()).find(".") != TString::npos) { + SplitTableName(column->Content(), part1, part2); + } + newChildren[i] = RenameJoinTable(columns->Pos(), ctx.NewAtom(columns->Pos(), part1), upstreamTablesRename, ctx); newChildren[i + 1] = ctx.NewAtom(columns->Pos(), part2); - - return nullptr; } } @@ -295,13 +297,13 @@ TExprNode::TPtr ReassembleJoinEquality(TExprNode::TPtr columns, const TStringBuf return ret; } -TExprNode::TPtr FuseJoinTree(TExprNode::TPtr downstreamJoinTree, TExprNode::TPtr upstreamJoinTree, const TStringBuf& upstreamLabel, +TExprNode::TPtr FuseJoinTree(TExprNode::TPtr downstreamJoinTree, TExprNode::TPtr upstreamJoinTree, const THashSet<TStringBuf>& upstreamLabels, const THashMap<TString, TString>& upstreamTablesRename, const THashMap<TString, TString>& upstreamColumnsBackRename, TExprContext& ctx) { TExprNode::TPtr left; if (downstreamJoinTree->Child(1)->IsAtom()) { - if (downstreamJoinTree->Child(1)->Content() != upstreamLabel) { + if (!upstreamLabels.contains(downstreamJoinTree->Child(1)->Content())) { left = downstreamJoinTree->Child(1); } else { @@ -309,7 +311,7 @@ TExprNode::TPtr FuseJoinTree(TExprNode::TPtr downstreamJoinTree, TExprNode::TPtr } } else { - left = FuseJoinTree(downstreamJoinTree->Child(1), upstreamJoinTree, upstreamLabel, upstreamTablesRename, + left = FuseJoinTree(downstreamJoinTree->Child(1), upstreamJoinTree, upstreamLabels, upstreamTablesRename, upstreamColumnsBackRename, ctx); if (!left) { return nullptr; @@ -318,14 +320,14 @@ TExprNode::TPtr FuseJoinTree(TExprNode::TPtr downstreamJoinTree, TExprNode::TPtr TExprNode::TPtr right; if (downstreamJoinTree->Child(2)->IsAtom()) { - if (downstreamJoinTree->Child(2)->Content() != upstreamLabel) { + if (!upstreamLabels.contains(downstreamJoinTree->Child(2)->Content())) { right = downstreamJoinTree->Child(2); } else { right = RenameJoinTree(upstreamJoinTree, upstreamTablesRename, ctx); } } else { - right = FuseJoinTree(downstreamJoinTree->Child(2), upstreamJoinTree, upstreamLabel, upstreamTablesRename, + right = FuseJoinTree(downstreamJoinTree->Child(2), upstreamJoinTree, upstreamLabels, upstreamTablesRename, upstreamColumnsBackRename, ctx); if (!right) { return nullptr; @@ -335,9 +337,9 @@ TExprNode::TPtr FuseJoinTree(TExprNode::TPtr downstreamJoinTree, TExprNode::TPtr TExprNode::TListType newChildren(downstreamJoinTree->ChildrenList()); newChildren[1] = left; newChildren[2] = right; - newChildren[3] = ReassembleJoinEquality(downstreamJoinTree->Child(3), upstreamLabel, upstreamTablesRename, + newChildren[3] = ReassembleJoinEquality(downstreamJoinTree->Child(3), upstreamLabels, upstreamTablesRename, upstreamColumnsBackRename, ctx); - newChildren[4] = ReassembleJoinEquality(downstreamJoinTree->Child(4), upstreamLabel, upstreamTablesRename, + newChildren[4] = ReassembleJoinEquality(downstreamJoinTree->Child(4), upstreamLabels, upstreamTablesRename, upstreamColumnsBackRename, ctx); if (!newChildren[3] || !newChildren[4]) { return nullptr; @@ -347,18 +349,37 @@ TExprNode::TPtr FuseJoinTree(TExprNode::TPtr downstreamJoinTree, TExprNode::TPtr return ret; } -TExprNode::TPtr FuseEquiJoins(const TExprNode::TPtr& node, ui32 upstreamIndex, TExprContext& ctx) { +bool IsSuitableToFuseInputMultiLabels(TOptimizeContext &optCtx) { + YQL_ENSURE(optCtx.Types); + static const char optName[] = "FuseEquiJoinsInputMultiLabels"; + return IsOptimizerEnabled<optName>(*optCtx.Types); +} + +TExprNode::TPtr FuseEquiJoins(const TExprNode::TPtr& node, ui32 upstreamIndex, TExprContext& ctx, TOptimizeContext &optCtx) { ui32 downstreamInputs = node->ChildrenSize() - 2; auto upstreamList = node->Child(upstreamIndex)->Child(0); auto upstreamLabel = node->Child(upstreamIndex)->Child(1); + THashSet<TStringBuf> upstreamLabelsAssociatedByInputIndex; THashSet<TStringBuf> downstreamLabels; for (ui32 i = 0; i < downstreamInputs; ++i) { auto label = node->Child(i)->Child(1); - if (!label->IsAtom()) { - return node; + if (auto list = TMaybeNode<TCoAtomList>(label)) { + if (!IsSuitableToFuseInputMultiLabels(optCtx)) { + return node; + } + for (auto labelAtom : list.Cast()) { + auto label = labelAtom.Value(); + downstreamLabels.insert(label); + if (upstreamIndex == i) { + upstreamLabelsAssociatedByInputIndex.insert(label); + } + } + } else { + if (upstreamIndex == i) { + upstreamLabelsAssociatedByInputIndex.insert(label->Content()); + } + downstreamLabels.insert(label->Content()); } - - downstreamLabels.insert(label->Content()); } THashMap<TString, TString> upstreamTablesRename; // rename of conflicted upstream tables @@ -381,7 +402,18 @@ TExprNode::TPtr FuseEquiJoins(const TExprNode::TPtr& node, ui32 upstreamIndex, T return node; } - if (downstreamLabels.contains(label->Content())) { + if (upstreamLabelsAssociatedByInputIndex.size() == 1 && downstreamLabels.contains(label->Content()) || + // In case multiple labels input, we are not renaming labels associated with upstream input index. + // For example: + // (let ej1 = (EquiJoin '(input1, 'a), '(input2, 'b), upstreamJoinTree, '())) + // (let ej2 = (EquiJoin '(ej1, '('a 'b)), '(input3, 'c), downstreamJoinTree, '()))) + // Upstream labels: [a, b]; + // Downstream labels: [a, b, c]; + // Not renaming [a, b] because their associated with input index. + // As result we should get: + // (let ejFused = (EquiJoin '(input1, 'a), '(input2, 'b), '(input3, 'c), fusedJoinTree, '())) + (upstreamLabelsAssociatedByInputIndex.size() > 1 && downstreamLabels.contains(label->Content()) && + !upstreamLabelsAssociatedByInputIndex.contains(label->Content()))) { // fix conflict for labels for (ui32 suffix = 1;; ++suffix) { auto newName = TString::Join(label->Content(), "_", ToString(suffix)); @@ -481,26 +513,35 @@ TExprNode::TPtr FuseEquiJoins(const TExprNode::TPtr& node, ui32 upstreamIndex, T } } - for (auto& x : upstreamColumnsRename) { - for (auto& y : x.second) { - TStringBuf part1; - TStringBuf part2; - SplitTableName(x.first, part1, part2); - if (auto renamed = upstreamTablesRename.FindPtr(part1)) { - part1 = *renamed; - } - - settingsChildren.push_back(ctx.Builder(node->Pos()) - .List() - .Atom(0, "rename") - .Atom(1, TString::Join(part1, ".", part2)) - .Atom(2, TString::Join(upstreamLabel->Content(), ".", y)) - .Seal() - .Build()); - } - } - - auto joinTree = FuseJoinTree(downstreamJoinTree, upstreamJoinTree, upstreamLabel->Content(), + for (auto& x : upstreamColumnsRename) { + for (auto& y : x.second) { + TStringBuf part1; + TStringBuf part2; + SplitTableName(x.first, part1, part2); + TStringBuf labelName = upstreamLabel->Content(); + if (upstreamLabelsAssociatedByInputIndex.size() > 1) { + if (upstreamLabelsAssociatedByInputIndex.contains(part1)) { + continue; + } else { + labelName = part1; + } + } + + if (auto renamed = upstreamTablesRename.FindPtr(part1)) { + part1 = *renamed; + } + + settingsChildren.push_back(ctx.Builder(node->Pos()) + .List() + .Atom(0, "rename") + .Atom(1, TString::Join(part1, ".", part2)) + .Atom(2, TString::Join(labelName, ".", y)) + .Seal() + .Build()); + } + } + + auto joinTree = FuseJoinTree(downstreamJoinTree, upstreamJoinTree, upstreamLabelsAssociatedByInputIndex, upstreamTablesRename, upstreamColumnsBackRename, ctx); if (!joinTree) { return node; @@ -514,6 +555,7 @@ TExprNode::TPtr FuseEquiJoins(const TExprNode::TPtr& node, ui32 upstreamIndex, T return ret; } + bool IsRenamingOrPassthroughFlatMap(const TCoFlatMapBase& flatMap, THashMap<TStringBuf, TStringBuf>& renames, THashSet<TStringBuf>& outputMembers, bool& isIdentity) { @@ -2000,15 +2042,18 @@ void RegisterCoFlowCallables2(TCallableOptimizerMap& map) { }; map["EquiJoin"] = [](const TExprNode::TPtr& node, TExprContext& ctx, TOptimizeContext& optCtx) { - ui32 inputsCount = node->ChildrenSize() - 2; - for (ui32 i = 0; i < inputsCount; ++i) { - if (node->Child(i)->Child(0)->IsCallable("EquiJoin") && - optCtx.IsSingleUsage(*node->Child(i)) && - optCtx.IsSingleUsage(*node->Child(i)->Child(0))) { - auto ret = FuseEquiJoins(node, i, ctx); - if (ret != node) { - YQL_CLOG(DEBUG, Core) << "FuseEquiJoins"; - return ret; + if (!optCtx.ForPeephole) { + // Peephole splits EquiJoin to pairs, so we don't perform FuseEquiJoin here + ui32 inputsCount = node->ChildrenSize() - 2; + for (ui32 i = 0; i < inputsCount; ++i) { + if (node->Child(i)->Child(0)->IsCallable("EquiJoin") && + optCtx.IsSingleUsage(*node->Child(i)) && + optCtx.IsSingleUsage(*node->Child(i)->Child(0))) { + auto ret = FuseEquiJoins(node, i, ctx, optCtx); + if (ret != node) { + YQL_CLOG(DEBUG, Core) << "FuseEquiJoins"; + return ret; + } } } } diff --git a/yql/essentials/core/common_opt/yql_co_transformer.cpp b/yql/essentials/core/common_opt/yql_co_transformer.cpp index bde50bb6077..f249c80e0bd 100644 --- a/yql/essentials/core/common_opt/yql_co_transformer.cpp +++ b/yql/essentials/core/common_opt/yql_co_transformer.cpp @@ -22,9 +22,10 @@ namespace { class TCommonOptTransformer final : public TSyncTransformerBase { public: - TCommonOptTransformer(TTypeAnnotationContext* typeCtx, bool final) + TCommonOptTransformer(TTypeAnnotationContext* typeCtx, bool final, bool forPeephole) : TypeCtx(typeCtx) , Final(final) + , ForPeephole(forPeephole) {} IGraphTransformer::TStatus DoTransform(TExprNode::TPtr input, TExprNode::TPtr& output, TExprContext& ctx) final; @@ -47,17 +48,18 @@ private: THashSet<TIssue> AddedErrors; TTypeAnnotationContext* TypeCtx; const bool Final; + const bool ForPeephole; bool CheckMissingWorld = false; }; } -TAutoPtr<IGraphTransformer> CreateCommonOptTransformer(TTypeAnnotationContext* typeCtx) { - return new TCommonOptTransformer(typeCtx, false); +TAutoPtr<IGraphTransformer> CreateCommonOptTransformer(bool forPeephole, TTypeAnnotationContext* typeCtx) { + return new TCommonOptTransformer(typeCtx, false, forPeephole); } TAutoPtr<IGraphTransformer> CreateCommonOptFinalTransformer(TTypeAnnotationContext* typeCtx) { - return new TCommonOptTransformer(typeCtx, true); + return new TCommonOptTransformer(typeCtx, true, false); } IGraphTransformer::TStatus TCommonOptTransformer::DoTransform(TExprNode::TPtr input, TExprNode::TPtr& output, TExprContext& ctx) { @@ -148,6 +150,7 @@ IGraphTransformer::TStatus TCommonOptTransformer::DoTransform( TParentsMap parentsMap; TOptimizeContext optCtx; optCtx.Types = TypeCtx; + optCtx.ForPeephole = ForPeephole; if (withParents) { GatherParents(*input, parentsMap); optCtx.ParentsMap = &parentsMap; diff --git a/yql/essentials/core/common_opt/yql_co_transformer.h b/yql/essentials/core/common_opt/yql_co_transformer.h index 7ff5875244f..8480e945425 100644 --- a/yql/essentials/core/common_opt/yql_co_transformer.h +++ b/yql/essentials/core/common_opt/yql_co_transformer.h @@ -8,7 +8,7 @@ namespace NYql { -TAutoPtr<IGraphTransformer> CreateCommonOptTransformer(TTypeAnnotationContext* typeCtx); +TAutoPtr<IGraphTransformer> CreateCommonOptTransformer(bool forPeephole, TTypeAnnotationContext* typeCtx); TAutoPtr<IGraphTransformer> CreateCommonOptFinalTransformer(TTypeAnnotationContext* typeCtx); } diff --git a/yql/essentials/core/facade/yql_facade.cpp b/yql/essentials/core/facade/yql_facade.cpp index b9c9fee537a..1fafbb00c3d 100644 --- a/yql/essentials/core/facade/yql_facade.cpp +++ b/yql/essentials/core/facade/yql_facade.cpp @@ -29,6 +29,7 @@ #include <yql/essentials/providers/common/udf_resolve/yql_simple_udf_resolver.h> #include <yql/essentials/providers/common/udf_resolve/yql_outproc_udf_resolver.h> #include <yql/essentials/providers/common/udf_resolve/yql_udf_resolver_with_index.h> +#include <yql/essentials/providers/common/udf_resolve/yql_udf_resolver_logger.h> #include <yql/essentials/providers/common/arrow_resolve/yql_simple_arrow_resolver.h> #include <yql/essentials/providers/common/config/yql_setting.h> #include <yql/essentials/core/qplayer/udf_resolver/yql_qplayer_udf_resolver.h> @@ -218,6 +219,10 @@ void TProgramFactory::SetArrowResolver(IArrowResolver::TPtr arrowResolver) { ArrowResolver_ = arrowResolver; } +void TProgramFactory::SetUdfResolverLogfile(const TString& path) { + UdfResolverLogfile_ = path; +} + void TProgramFactory::SetUrlListerManager(IUrlListerManagerPtr urlListerManager) { UrlListerManager_ = std::move(urlListerManager); } @@ -249,7 +254,16 @@ TProgramPtr TProgramFactory::Create( TUdfIndexPackageSet::TPtr udfIndexPackageSet = (UdfIndexPackageSet_ && hiddenMode == EHiddenMode::Disable) ? UdfIndexPackageSet_->Clone() : nullptr; IModuleResolver::TPtr moduleResolver = Modules_ ? Modules_->CreateMutableChild() : nullptr; IUrlListerManagerPtr urlListerManager = UrlListerManager_ ? UrlListerManager_->Clone() : nullptr; - auto udfResolver = udfIndex ? NCommon::CreateUdfResolverWithIndex(udfIndex, UdfResolver_, FileStorage_) : UdfResolver_; + + auto udfResolver = UdfResolver_; + + if (UdfResolverLogfile_) { + udfResolver = NCommon::CreateUdfResolverDecoratorWithLogger(udfResolver, *UdfResolverLogfile_, sessionId); + } + + if (udfIndex) { + udfResolver = NCommon::CreateUdfResolverWithIndex(udfIndex, udfResolver, FileStorage_); + } // make UserDataTable_ copy here return new TProgram(FunctionRegistry_, randomProvider, timeProvider, NextUniqueId_, DataProvidersInit_, diff --git a/yql/essentials/core/facade/yql_facade.h b/yql/essentials/core/facade/yql_facade.h index 4c6532ab0a7..f231a365011 100644 --- a/yql/essentials/core/facade/yql_facade.h +++ b/yql/essentials/core/facade/yql_facade.h @@ -64,6 +64,7 @@ public: void SetUrlPreprocessing(IUrlPreprocessing::TPtr urlPreprocessing); void EnableRangeComputeFor(); void SetArrowResolver(IArrowResolver::TPtr arrowResolver); + void SetUdfResolverLogfile(const TString& path); TProgramPtr Create( const TFile& file, @@ -101,6 +102,7 @@ private: TString Runner_; bool EnableRangeComputeFor_ = false; IArrowResolver::TPtr ArrowResolver_; + TMaybe<TString> UdfResolverLogfile_; }; /////////////////////////////////////////////////////////////////////////////// diff --git a/yql/essentials/core/peephole_opt/yql_opt_peephole_physical.cpp b/yql/essentials/core/peephole_opt/yql_opt_peephole_physical.cpp index 28ee1ead8f5..ef78839b26d 100644 --- a/yql/essentials/core/peephole_opt/yql_opt_peephole_physical.cpp +++ b/yql/essentials/core/peephole_opt/yql_opt_peephole_physical.cpp @@ -9108,7 +9108,7 @@ THolder<IGraphTransformer> CreatePeepHoleCommonStageTransformer(TTypeAnnotationC auto issueCode = TIssuesIds::CORE_EXEC; - pipeline.AddCommonOptimization(issueCode); + pipeline.AddCommonOptimization(true, issueCode); pipeline.Add(CreateFunctorTransformer( [&types](const TExprNode::TPtr& input, TExprNode::TPtr& output, TExprContext& ctx) { return PeepHoleCommonStage(input, output, ctx, types, diff --git a/yql/essentials/core/qplayer/udf_resolver/yql_qplayer_udf_resolver.cpp b/yql/essentials/core/qplayer/udf_resolver/yql_qplayer_udf_resolver.cpp index c80fe494c6a..d2900e7783e 100644 --- a/yql/essentials/core/qplayer/udf_resolver/yql_qplayer_udf_resolver.cpp +++ b/yql/essentials/core/qplayer/udf_resolver/yql_qplayer_udf_resolver.cpp @@ -38,7 +38,7 @@ public: } bool LoadMetadata(const TVector<TImport*>& imports, - const TVector<TFunction*>& functions, TExprContext& ctx, NUdf::ELogLevel logLevel) const final { + const TVector<TFunction*>& functions, TExprContext& ctx, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const final { if (QContext_.CanRead()) { for (auto& f : functions) { auto key = MakeKey(f); @@ -53,7 +53,7 @@ public: return true; } - auto res = Inner_->LoadMetadata(imports, functions, ctx, logLevel); + auto res = Inner_->LoadMetadata(imports, functions, ctx, logLevel, storage); if (res && QContext_.CanWrite()) { // calculate hash for each function and store it for (const auto& f : functions) { @@ -66,12 +66,12 @@ public: return res; } - TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel) const final { + TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const final { if (QContext_.CanRead()) { ythrow yexception() << "Can't replay LoadRichMetadata"; } - return Inner_->LoadRichMetadata(imports, logLevel); + return Inner_->LoadRichMetadata(imports, logLevel, storage); } bool ContainsModule(const TStringBuf& moduleName) const final { diff --git a/yql/essentials/core/services/yql_transform_pipeline.cpp b/yql/essentials/core/services/yql_transform_pipeline.cpp index 2dd8f2c2787..c6bb45a2189 100644 --- a/yql/essentials/core/services/yql_transform_pipeline.cpp +++ b/yql/essentials/core/services/yql_transform_pipeline.cpp @@ -137,13 +137,13 @@ TTransformationPipeline& TTransformationPipeline::AddPostTypeAnnotation(bool for return *this; } -TTransformationPipeline& TTransformationPipeline::AddCommonOptimization(EYqlIssueCode issueCode) { +TTransformationPipeline& TTransformationPipeline::AddCommonOptimization(bool forPeephole, EYqlIssueCode issueCode) { // auto instantCallableTransformer = // CreateExtCallableTypeAnnotationTransformer(*TypeAnnotationContext_, true); // TypeAnnotationContext_->CustomInstantTypeTransformer = // CreateTypeAnnotationTransformer(instantCallableTransformer, *TypeAnnotationContext_); Transformers_.push_back(TTransformStage( - CreateCommonOptTransformer(TypeAnnotationContext_.Get()), + CreateCommonOptTransformer(forPeephole, TypeAnnotationContext_.Get()), "CommonOptimization", issueCode)); return *this; @@ -158,7 +158,7 @@ TTransformationPipeline& TTransformationPipeline::AddFinalCommonOptimization(EYq } TTransformationPipeline& TTransformationPipeline::AddOptimization(bool checkWorld, bool withFinalOptimization, EYqlIssueCode issueCode) { - AddCommonOptimization(issueCode); + AddCommonOptimization(false, issueCode); Transformers_.push_back(TTransformStage( CreateChoiceGraphTransformer( [&typesCtx = std::as_const(*TypeAnnotationContext_)](const TExprNode::TPtr&, TExprContext&) { @@ -199,7 +199,7 @@ TTransformationPipeline& TTransformationPipeline::AddOptimization(bool checkWorl } TTransformationPipeline& TTransformationPipeline::AddLineageOptimization(TMaybe<TString>& lineageOut, EYqlIssueCode issueCode) { - AddCommonOptimization(issueCode); + AddCommonOptimization(false, issueCode); Transformers_.push_back(TTransformStage( CreateFunctorTransformer( [typeCtx = TypeAnnotationContext_, &lineageOut](const TExprNode::TPtr& input, TExprNode::TPtr& output, TExprContext& ctx) { diff --git a/yql/essentials/core/services/yql_transform_pipeline.h b/yql/essentials/core/services/yql_transform_pipeline.h index e9326746faf..83250336db0 100644 --- a/yql/essentials/core/services/yql_transform_pipeline.h +++ b/yql/essentials/core/services/yql_transform_pipeline.h @@ -32,7 +32,7 @@ public: TTransformationPipeline& AddIOAnnotation(bool withEpochsTransformer = true, EYqlIssueCode issueCode = TIssuesIds::CORE_PRE_TYPE_ANN); TTransformationPipeline& AddTypeAnnotation(EYqlIssueCode issueCode = TIssuesIds::CORE_TYPE_ANN, bool twoStages = false); TTransformationPipeline& AddPostTypeAnnotation(bool forSubGraph = false, bool disableConstraintCheck = false, EYqlIssueCode issueCode = TIssuesIds::CORE_POST_TYPE_ANN); - TTransformationPipeline& AddCommonOptimization(EYqlIssueCode issueCode = TIssuesIds::CORE_OPTIMIZATION); + TTransformationPipeline& AddCommonOptimization(bool forPeephole = false, EYqlIssueCode issueCode = TIssuesIds::CORE_OPTIMIZATION); TTransformationPipeline& AddFinalCommonOptimization(EYqlIssueCode issueCode = TIssuesIds::CORE_OPTIMIZATION); TTransformationPipeline& AddOptimization(bool checkWorld = true, bool withFinalOptimization = true, EYqlIssueCode issueCode = TIssuesIds::CORE_OPTIMIZATION); TTransformationPipeline& AddLineageOptimization(TMaybe<TString>& lineageOut, EYqlIssueCode issueCode = TIssuesIds::CORE_OPTIMIZATION); diff --git a/yql/essentials/core/type_ann/type_ann_core.cpp b/yql/essentials/core/type_ann/type_ann_core.cpp index cd6bd71608b..91924ba853f 100644 --- a/yql/essentials/core/type_ann/type_ann_core.cpp +++ b/yql/essentials/core/type_ann/type_ann_core.cpp @@ -486,7 +486,7 @@ namespace NTypeAnnImpl { imports.push_back(&x.second); } - if (!Types.UdfResolver->LoadMetadata(imports, functions, Expr, Types.RuntimeLogLevel)) { + if (!Types.UdfResolver->LoadMetadata(imports, functions, Expr, Types.RuntimeLogLevel, Types.UserDataStorage->GetHoldingFileStorage())) { return false; } diff --git a/yql/essentials/core/yql_holding_file_storage.cpp b/yql/essentials/core/yql_holding_file_storage.cpp index 9ff7c929619..d51cdfffb0f 100644 --- a/yql/essentials/core/yql_holding_file_storage.cpp +++ b/yql/essentials/core/yql_holding_file_storage.cpp @@ -25,6 +25,16 @@ TFileLinkPtr THoldingFileStorage::FreezeFile(const TUserDataBlock& block) { return FindOrPutData(block); } + +TFileLinkPtr THoldingFileStorage::GetFrozenBlock(const TUserDataBlock& block) const { + if (block.FrozenFile) { + return block.FrozenFile; + } + auto it = Links_.find(block); + Y_ENSURE (it != Links_.end()); + return it->second; +} + NThreading::TFuture<std::function<TFileLinkPtr()>> THoldingFileStorage::FreezeFileAsync(const TUserDataBlock& block) { if (block.FrozenFile) { return MakeFutureWithConstantAction(block.FrozenFile); diff --git a/yql/essentials/core/yql_holding_file_storage.h b/yql/essentials/core/yql_holding_file_storage.h index 4eef6099aaf..790e89efb77 100644 --- a/yql/essentials/core/yql_holding_file_storage.h +++ b/yql/essentials/core/yql_holding_file_storage.h @@ -23,6 +23,8 @@ public: // if we have single url but with different tokens we can potentially download several different versions of url TFileLinkPtr FreezeFile(const TUserDataBlock& block); + TFileLinkPtr GetFrozenBlock(const TUserDataBlock& block) const; + // downloaded file will be registered in cache after function invocation NThreading::TFuture<std::function<TFileLinkPtr()>> FreezeFileAsync(const TUserDataBlock& block); diff --git a/yql/essentials/core/yql_udf_index.cpp b/yql/essentials/core/yql_udf_index.cpp index 4779770550e..f861e9eca65 100644 --- a/yql/essentials/core/yql_udf_index.cpp +++ b/yql/essentials/core/yql_udf_index.cpp @@ -290,25 +290,25 @@ void TUdfIndex::RegisterResources(const TVector<TResourceInfo::TPtr>& resources, } } -void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TVector<TString>& paths, bool isTrusted, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, NUdf::ELogLevel logLevel) { +void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TVector<TString>& paths, bool isTrusted, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, THoldingFileStorage& storage, NUdf::ELogLevel logLevel) { TMap<TString, TString> pathsWithMd5; for (const auto& path : paths) { pathsWithMd5[path] = ""; } - LoadRichMetadataToUdfIndex(resolver, pathsWithMd5, isTrusted, mode, registry, logLevel); + LoadRichMetadataToUdfIndex(resolver, pathsWithMd5, isTrusted, mode, registry, storage, logLevel); } -void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TMap<TString, TString>& pathsWithMd5, bool isTrusted, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, NUdf::ELogLevel logLevel) { +void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TMap<TString, TString>& pathsWithMd5, bool isTrusted, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, THoldingFileStorage& storage, NUdf::ELogLevel logLevel) { TVector<TString> paths; paths.reserve(pathsWithMd5.size()); for (const auto& p : pathsWithMd5) { paths.push_back(p.first); } - const TResolveResult resolveResult = LoadRichMetadata(resolver, paths, logLevel); + const TResolveResult resolveResult = LoadRichMetadata(resolver, paths, storage, logLevel); AddResolveResultToRegistry(resolveResult, pathsWithMd5, isTrusted, mode, registry); } -void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TVector<TUserDataBlock>& blocks, bool isTrusted, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, NUdf::ELogLevel logLevel) { +void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TVector<TUserDataBlock>& blocks, bool isTrusted, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, THoldingFileStorage& storage, NUdf::ELogLevel logLevel) { TVector<TUserDataBlock> blocksResolve; blocksResolve.reserve(blocks.size()); // we can work with file path only @@ -342,16 +342,17 @@ void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TVector<TUse br.Data = path; br.Usage.Set(EUserDataBlockUsage::Udf); br.CustomUdfPrefix = b.CustomUdfPrefix; + br.FrozenFile = b.FrozenFile; blocksResolve.emplace_back(br); } - const TResolveResult resolveResult = LoadRichMetadata(resolver, blocksResolve, logLevel); + const TResolveResult resolveResult = LoadRichMetadata(resolver, blocksResolve, storage, logLevel); AddResolveResultToRegistry(resolveResult, pathsWithMd5, isTrusted, mode, registry); } -void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TUserDataBlock& block, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, NUdf::ELogLevel logLevel) { +void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TUserDataBlock& block, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, THoldingFileStorage& storage, NUdf::ELogLevel logLevel) { TVector<TUserDataBlock> blocks({ block }); const bool isTrusted = false; - LoadRichMetadataToUdfIndex(resolver, blocks, isTrusted, mode, registry, logLevel); + LoadRichMetadataToUdfIndex(resolver, blocks, isTrusted, mode, registry, storage, logLevel); } } // namespace NYql diff --git a/yql/essentials/core/yql_udf_index.h b/yql/essentials/core/yql_udf_index.h index 2b6a7fdea6f..4f2f33404ca 100644 --- a/yql/essentials/core/yql_udf_index.h +++ b/yql/essentials/core/yql_udf_index.h @@ -139,9 +139,9 @@ private: TMap<TString, TSet<TString>> ICaseModules_; }; -void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TVector<TString>& paths, bool isTrusted, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); -void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TMap<TString, TString>& pathsWithMd5, bool isTrusted, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); -void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TVector<TUserDataBlock>& blocks, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); -void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TUserDataBlock& block, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); +void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TVector<TString>& paths, bool isTrusted, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, THoldingFileStorage& storage, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); +void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TMap<TString, TString>& pathsWithMd5, bool isTrusted, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, THoldingFileStorage& storage, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); +void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TVector<TUserDataBlock>& blocks, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, THoldingFileStorage& storage, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); +void LoadRichMetadataToUdfIndex(const IUdfResolver& resolver, const TUserDataBlock& block, TUdfIndex::EOverrideMode mode, TUdfIndex& registry, THoldingFileStorage& storage, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); } diff --git a/yql/essentials/core/yql_udf_resolver.cpp b/yql/essentials/core/yql_udf_resolver.cpp index c0742dde474..3e3e9bed14c 100644 --- a/yql/essentials/core/yql_udf_resolver.cpp +++ b/yql/essentials/core/yql_udf_resolver.cpp @@ -2,7 +2,7 @@ namespace NYql { -TResolveResult LoadRichMetadata(const IUdfResolver& resolver, const TVector<TUserDataBlock>& blocks, NUdf::ELogLevel logLevel) { +TResolveResult LoadRichMetadata(const IUdfResolver& resolver, const TVector<TUserDataBlock>& blocks, THoldingFileStorage& storage, NUdf::ELogLevel logLevel) { TVector<IUdfResolver::TImport> imports; imports.reserve(blocks.size()); std::transform(blocks.begin(), blocks.end(), std::back_inserter(imports), [](auto& b) { @@ -13,10 +13,10 @@ TResolveResult LoadRichMetadata(const IUdfResolver& resolver, const TVector<TUse return import; }); - return resolver.LoadRichMetadata(imports, logLevel); + return resolver.LoadRichMetadata(imports, logLevel, storage); } -TResolveResult LoadRichMetadata(const IUdfResolver& resolver, const TVector<TString>& paths, NUdf::ELogLevel logLevel) { +TResolveResult LoadRichMetadata(const IUdfResolver& resolver, const TVector<TString>& paths, THoldingFileStorage& storage, NUdf::ELogLevel logLevel) { TVector<TUserDataBlock> blocks; blocks.reserve(paths.size()); std::transform(paths.begin(), paths.end(), std::back_inserter(blocks), [](auto& p) { @@ -27,7 +27,7 @@ TResolveResult LoadRichMetadata(const IUdfResolver& resolver, const TVector<TStr return b; }); - return LoadRichMetadata(resolver, blocks, logLevel); + return LoadRichMetadata(resolver, blocks, storage, logLevel); } } diff --git a/yql/essentials/core/yql_udf_resolver.h b/yql/essentials/core/yql_udf_resolver.h index ade582f822e..dff7e5bc07a 100644 --- a/yql/essentials/core/yql_udf_resolver.h +++ b/yql/essentials/core/yql_udf_resolver.h @@ -3,6 +3,7 @@ #include "yql_user_data.h" #include <yql/essentials/providers/common/proto/udf_resolver.pb.h> +#include <yql/essentials/core/yql_holding_file_storage.h> #include <yql/essentials/public/issue/yql_issue.h> #include <yql/essentials/public/udf/udf_log.h> @@ -68,13 +69,13 @@ public: */ virtual TMaybe<TFilePathWithMd5> GetSystemModulePath(const TStringBuf& moduleName) const = 0; virtual bool LoadMetadata(const TVector<TImport*>& imports, - const TVector<TFunction*>& functions, TExprContext& ctx, NUdf::ELogLevel logLevel) const = 0; + const TVector<TFunction*>& functions, TExprContext& ctx, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const = 0; - virtual TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel) const = 0; + virtual TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const = 0; virtual bool ContainsModule(const TStringBuf& moduleName) const = 0; }; -TResolveResult LoadRichMetadata(const IUdfResolver& resolver, const TVector<TUserDataBlock>& blocks, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); -TResolveResult LoadRichMetadata(const IUdfResolver& resolver, const TVector<TString>& paths, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); +TResolveResult LoadRichMetadata(const IUdfResolver& resolver, const TVector<TUserDataBlock>& blocks, THoldingFileStorage& storage, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); +TResolveResult LoadRichMetadata(const IUdfResolver& resolver, const TVector<TString>& paths, THoldingFileStorage& storage, NUdf::ELogLevel logLevel = NUdf::ELogLevel::Info); } diff --git a/yql/essentials/core/yql_user_data_storage.cpp b/yql/essentials/core/yql_user_data_storage.cpp index 1893067a574..26d93387787 100644 --- a/yql/essentials/core/yql_user_data_storage.cpp +++ b/yql/essentials/core/yql_user_data_storage.cpp @@ -223,6 +223,10 @@ TUserDataBlock* TUserDataStorage::FreezeNoThrow(const TUserDataKey& key, TString } } +THoldingFileStorage& TUserDataStorage::GetHoldingFileStorage() { + return FileStorage_; +} + TUserDataBlock* TUserDataStorage::FreezeUdfNoThrow(const TUserDataKey& key, TString& errorMessage,const TString& customUdfPrefix, NUdf::ELogLevel logLevel) { @@ -246,7 +250,7 @@ TUserDataBlock* TUserDataStorage::FreezeUdfNoThrow(const TUserDataKey& key, YQL_PROFILE_SCOPE(DEBUG, scope.c_str()); Y_ENSURE(UdfResolver_); Y_ENSURE(UdfIndex_); - LoadRichMetadataToUdfIndex(*UdfResolver_, *block, TUdfIndex::EOverrideMode::ReplaceWithNew, *UdfIndex_, logLevel); + LoadRichMetadataToUdfIndex(*UdfResolver_, *block, TUdfIndex::EOverrideMode::ReplaceWithNew, *UdfIndex_, FileStorage_, logLevel); } catch (const std::exception& e) { errorMessage = TStringBuilder() << "Failed to scan udf with key " << key << ", details: " << e.what(); return nullptr; diff --git a/yql/essentials/core/yql_user_data_storage.h b/yql/essentials/core/yql_user_data_storage.h index 70abdf83729..e937635ef50 100644 --- a/yql/essentials/core/yql_user_data_storage.h +++ b/yql/essentials/core/yql_user_data_storage.h @@ -60,6 +60,8 @@ public: TUserDataBlock& Freeze(const TUserDataKey& key); TUserDataBlock* FreezeNoThrow(const TUserDataKey& key, TString& errorMessage); + THoldingFileStorage& GetHoldingFileStorage(); + // as above + udf will be scanned and meta info put into UdfIndex TUserDataBlock* FreezeUdfNoThrow(const TUserDataKey& key, TString& errorMessage, const TString& customUdfPrefix, NUdf::ELogLevel logLevel); diff --git a/yql/essentials/data/language/pragmas_opensource.json b/yql/essentials/data/language/pragmas_opensource.json index a4a3ad73364..be5b8f62ae2 100644 --- a/yql/essentials/data/language/pragmas_opensource.json +++ b/yql/essentials/data/language/pragmas_opensource.json @@ -1 +1 @@ -[{"name":"yt.Annotations"},{"name":"yt.ApplyStoredConstraints"},{"name":"yt.Auth"},{"name":"yt.AutoMerge"},{"name":"yt.BatchListFolderConcurrency"},{"name":"yt.BinaryExpirationInterval"},{"name":"yt.BinaryTmpFolder"},{"name":"yt.BlockMapJoin"},{"name":"yt.BlockReaderSupportedDataTypes"},{"name":"yt.BlockReaderSupportedTypes"},{"name":"yt.BufferRowCount"},{"name":"yt.ClientMapTimeout"},{"name":"yt.ColumnGroupMode"},{"name":"yt.CombineCoreLimit"},{"name":"yt.CommonJoinCoreLimit"},{"name":"yt.CompactForDistinct"},{"name":"yt.CoreDumpPath"},{"name":"yt.DQRPCReaderInflight"},{"name":"yt.DQRPCReaderTimeout"},{"name":"yt.DataSizePerJob"},{"name":"yt.DataSizePerMapJob"},{"name":"yt.DataSizePerPartition"},{"name":"yt.DataSizePerSortJob"},{"name":"yt.DefaultCalcMemoryLimit"},{"name":"yt.DefaultCluster"},{"name":"yt.DefaultLocalityTimeout"},{"name":"yt.DefaultMapSelectivityFactor"},{"name":"yt.DefaultMaxJobFails"},{"name":"yt.DefaultMemoryDigestLowerBound"},{"name":"yt.DefaultMemoryLimit"},{"name":"yt.DefaultMemoryReserveFactor"},{"name":"yt.DefaultOperationWeight"},{"name":"yt.DefaultRuntimeCluster"},{"name":"yt.Description"},{"name":"yt.DisableFuseOperations"},{"name":"yt.DisableJobSplitting"},{"name":"yt.DisableOptimizers"},{"name":"yt.DockerImage"},{"name":"yt.DqPruneKeyFilterLambda"},{"name":"yt.DropUnusedKeysFromKeyFilter"},{"name":"yt.EnableDynamicStoreReadInDQ"},{"name":"yt.EnableFuseMapToMapReduce"},{"name":"yt.EnforceJobUtc"},{"name":"yt.ErasureCodecCpu"},{"name":"yt.ErasureCodecCpuForDq"},{"name":"yt.EvaluationTableSizeLimit"},{"name":"yt.ExpirationDeadline"},{"name":"yt.ExpirationInterval"},{"name":"yt.ExtendTableLimit"},{"name":"yt.ExtendedStatsMaxChunkCount"},{"name":"yt.ExternalTx"},{"name":"yt.ExtraTmpfsSize"},{"name":"yt.FileCacheTtl"},{"name":"yt.FmrOperationSpec"},{"name":"yt.FolderInlineDataLimit"},{"name":"yt.FolderInlineItemsLimit"},{"name":"yt.ForceInferSchema"},{"name":"yt.ForceJobSizeAdjuster"},{"name":"yt.ForceTmpSecurity"},{"name":"yt.GeobaseDownloadUrl"},{"name":"yt.HybridDqDataSizeLimitForOrdered"},{"name":"yt.HybridDqDataSizeLimitForUnordered"},{"name":"yt.HybridDqExecution"},{"name":"yt.HybridDqExecutionFallback"},{"name":"yt.IgnoreTypeV3"},{"name":"yt.IgnoreWeakSchema"},{"name":"yt.IgnoreYamrDsv"},{"name":"yt.InferSchema"},{"name":"yt.InferSchemaMode"},{"name":"yt.InferSchemaTableCountThreshold"},{"name":"yt.InflightTempTablesLimit"},{"name":"yt.IntermediateAccount"},{"name":"yt.IntermediateDataMedium"},{"name":"yt.IntermediateReplicationFactor"},{"name":"yt.JavascriptCpu"},{"name":"yt.JobBlockInput"},{"name":"yt.JobBlockInputSupportedDataTypes"},{"name":"yt.JobBlockInputSupportedTypes"},{"name":"yt.JobBlockOutput"},{"name":"yt.JobBlockOutputSupportedDataTypes"},{"name":"yt.JobBlockOutputSupportedTypes"},{"name":"yt.JobBlockTableContent"},{"name":"yt.JobEnv"},{"name":"yt.JoinAllowColumnRenames"},{"name":"yt.JoinCollectColumnarStatistics"},{"name":"yt.JoinColumnarStatisticsFetcherMode"},{"name":"yt.JoinCommonUseMapMultiOut"},{"name":"yt.JoinEnableStarJoin"},{"name":"yt.JoinMergeForce"},{"name":"yt.JoinMergeReduceJobMaxSize"},{"name":"yt.JoinMergeSetTopLevelFullSort"},{"name":"yt.JoinMergeTablesLimit"},{"name":"yt.JoinMergeUnsortedFactor"},{"name":"yt.JoinMergeUseSmallAsPrimary"},{"name":"yt.JoinUseColumnarStatistics"},{"name":"yt.JoinWaitAllInputs"},{"name":"yt.KeepTempTables"},{"name":"yt.KeyFilterForStartsWith"},{"name":"yt.LLVMMemSize"},{"name":"yt.LLVMNodeCountLimit"},{"name":"yt.LLVMPerNodeMemSize"},{"name":"yt.LayerPaths"},{"name":"yt.LocalCalcLimit"},{"name":"yt.LookupJoinLimit"},{"name":"yt.LookupJoinMaxRows"},{"name":"yt.MapJoinLimit"},{"name":"yt.MapJoinShardCount"},{"name":"yt.MapJoinShardMinRows"},{"name":"yt.MapJoinUseFlow"},{"name":"yt.MapLocalityTimeout"},{"name":"yt.MaxChunksForDqRead"},{"name":"yt.MaxColumnGroups"},{"name":"yt.MaxCpuUsageToFuseMultiOuts"},{"name":"yt.MaxExtraJobMemoryToFuseOperations"},{"name":"yt.MaxInputTables"},{"name":"yt.MaxInputTablesForSortedMerge"},{"name":"yt.MaxJobCount"},{"name":"yt.MaxKeyRangeCount"},{"name":"yt.MaxKeyWeight"},{"name":"yt.MaxOperationFiles"},{"name":"yt.MaxOutputTables"},{"name":"yt.MaxReplicationFactorToFuseMultiOuts"},{"name":"yt.MaxReplicationFactorToFuseOperations"},{"name":"yt.MaxRowWeight"},{"name":"yt.MaxSpeculativeJobCountPerTask"},{"name":"yt.MergeAdjacentPointRanges"},{"name":"yt.MinColumnGroupSize"},{"name":"yt.MinLocalityInputDataWeight"},{"name":"yt.MinPublishedAvgChunkSize"},{"name":"yt.MinTempAvgChunkSize"},{"name":"yt.NativeYtTypeCompatibility"},{"name":"yt.NetworkProject"},{"name":"yt.NightlyCompress"},{"name":"yt.OperationReaders"},{"name":"yt.OperationSpec"},{"name":"yt.OptimizeFor"},{"name":"yt.Owners"},{"name":"yt.ParallelOperationsLimit"},{"name":"yt.PartitionByConstantKeysViaMap"},{"name":"yt.Pool"},{"name":"yt.PoolTrees"},{"name":"yt.PrimaryMedium"},{"name":"yt.PruneKeyFilterLambda"},{"name":"yt.PruneQLFilterLambda"},{"name":"yt.PublishedAutoMerge"},{"name":"yt.PublishedCompressionCodec"},{"name":"yt.PublishedErasureCodec"},{"name":"yt.PublishedMedia"},{"name":"yt.PublishedPrimaryMedium"},{"name":"yt.PublishedReplicationFactor"},{"name":"yt.PythonCpu"},{"name":"yt.QueryCacheChunkLimit"},{"name":"yt.QueryCacheIgnoreTableRevision"},{"name":"yt.QueryCacheMode"},{"name":"yt.QueryCacheSalt"},{"name":"yt.QueryCacheTtl"},{"name":"yt.QueryCacheUseExpirationTimeout"},{"name":"yt.QueryCacheUseForCalc"},{"name":"yt.ReduceLocalityTimeout"},{"name":"yt.ReleaseTempData"},{"name":"yt.ReportEquiJoinStats"},{"name":"yt.RuntimeCluster"},{"name":"yt.RuntimeClusterSelection"},{"name":"yt.SamplingIoBlockSize"},{"name":"yt.SchedulingTag"},{"name":"yt.SchedulingTagFilter"},{"name":"yt.ScriptCpu"},{"name":"yt.SortLocalityTimeout"},{"name":"yt.StartedBy"},{"name":"yt.StaticPool"},{"name":"yt.SuspendIfAccountLimitExceeded"},{"name":"yt.SwitchLimit"},{"name":"yt.TableContentColumnarStatistics"},{"name":"yt.TableContentCompressLevel"},{"name":"yt.TableContentDeliveryMode"},{"name":"yt.TableContentLocalExecution"},{"name":"yt.TableContentMaxChunksForNativeDelivery"},{"name":"yt.TableContentMaxInputTables"},{"name":"yt.TableContentMinAvgChunkSize"},{"name":"yt.TableContentTmpFolder"},{"name":"yt.TableContentUseSkiff"},{"name":"yt.TablesTmpFolder"},{"name":"yt.TempTablesTtl"},{"name":"yt.TemporaryAutoMerge"},{"name":"yt.TemporaryCompressionCodec"},{"name":"yt.TemporaryErasureCodec"},{"name":"yt.TemporaryMedia"},{"name":"yt.TemporaryPrimaryMedium"},{"name":"yt.TemporaryReplicationFactor"},{"name":"yt.TentativePoolTrees"},{"name":"yt.TentativeTreeEligibilityMaxJobDurationRatio"},{"name":"yt.TentativeTreeEligibilityMinJobDuration"},{"name":"yt.TentativeTreeEligibilitySampleJobCount"},{"name":"yt.TmpFolder"},{"name":"yt.TopSortMaxLimit"},{"name":"yt.TopSortRowMultiplierPerJob"},{"name":"yt.TopSortSizePerJob"},{"name":"yt.UseAggPhases"},{"name":"yt.UseColumnGroupsFromInputTables"},{"name":"yt.UseColumnarStatistics"},{"name":"yt.UseDefaultTentativePoolTrees"},{"name":"yt.UseFlow"},{"name":"yt.UseIntermediateSchema"},{"name":"yt.UseIntermediateStreams"},{"name":"yt.UseNativeDescSort"},{"name":"yt.UseNativeDynamicTableRead"},{"name":"yt.UseNativeYtTypes"},{"name":"yt.UseNewPredicateExtraction"},{"name":"yt.UsePartitionsByKeysForFinalAgg"},{"name":"yt.UseQLFilter"},{"name":"yt.UseRPCReaderInDQ"},{"name":"yt.UseSkiff"},{"name":"yt.UseSystemColumns"},{"name":"yt.UseTmpfs"},{"name":"yt.UseTypeV2"},{"name":"yt.UseYqlRowSpecCompactForm"},{"name":"yt.UserSlots"},{"name":"yt.ViewIsolation"},{"name":"yt.WideFlowLimit"},{"name":"dq.AggregateStatsByStage"},{"name":"dq.AnalyticsHopping"},{"name":"dq.AnalyzeQuery"},{"name":"dq.ChannelBufferSize"},{"name":"dq.ChunkSizeLimit"},{"name":"dq.CollectCoreDumps"},{"name":"dq.ComputeActorType"},{"name":"dq.DataSizePerJob"},{"name":"dq.DisableCheckpoints"},{"name":"dq.DisableLLVMForBlockStages"},{"name":"dq.EnableChannelStats"},{"name":"dq.EnableComputeActor"},{"name":"dq.EnableDqReplicate"},{"name":"dq.EnableFullResultWrite"},{"name":"dq.EnableInsert"},{"name":"dq.EnableSpillingInChannels"},{"name":"dq.EnableSpillingNodes"},{"name":"dq.EnableStrip"},{"name":"dq.ExportStats"},{"name":"dq.FallbackPolicy"},{"name":"dq.HashJoinMode"},{"name":"dq.HashShuffleMaxTasks"},{"name":"dq.HashShuffleTasksRatio"},{"name":"dq.MaxDataSizePerJob"},{"name":"dq.MaxDataSizePerQuery"},{"name":"dq.MaxNetworkRetries"},{"name":"dq.MaxRetries"},{"name":"dq.MaxTasksPerOperation"},{"name":"dq.MaxTasksPerStage"},{"name":"dq.MemoryLimit"},{"name":"dq.OptLLVM"},{"name":"dq.OutputChunkMaxSize"},{"name":"dq.ParallelOperationsLimit"},{"name":"dq.PingTimeoutMs"},{"name":"dq.PullRequestTimeoutMs"},{"name":"dq.QueryTimeout"},{"name":"dq.RetryBackoffMs"},{"name":"dq.Scheduler"},{"name":"dq.SpillingEngine"},{"name":"dq.SplitStageOnDqReplicate"},{"name":"dq.TaskRunnerStats"},{"name":"dq.UseAggPhases"},{"name":"dq.UseBlockReader"},{"name":"dq.UseFastPickleTransport"},{"name":"dq.UseFinalizeByKey"},{"name":"dq.UseGraceJoinCoreForMap"},{"name":"dq.UseOOBTransport"},{"name":"dq.UseSimpleYtReader"},{"name":"dq.UseWideBlockChannels"},{"name":"dq.UseWideChannels"},{"name":"dq.WatermarksEnableIdlePartitions"},{"name":"dq.WatermarksGranularityMs"},{"name":"dq.WatermarksLateArrivalDelayMs"},{"name":"dq.WatermarksMode"},{"name":"dq.WorkerFilter"},{"name":"dq.WorkersPerOperation"},{"name":"AllowDotInAlias"},{"name":"AllowUnnamedColumns"},{"name":"AnsiCurrentRow"},{"name":"AnsiImplicitCrossJoin"},{"name":"AnsiInForEmptyOrNullableItemsCollections"},{"name":"AnsiLike"},{"name":"AnsiOptionalAs"},{"name":"AnsiRankForNullableKeys"},{"name":"AutoCommit"},{"name":"BlockEngine"},{"name":"BlockEngineEnable"},{"name":"BlockEngineForce"},{"name":"BogousStarInGroupByOverJoin"},{"name":"CheckedOps"},{"name":"ClassicDivision"},{"name":"CoalesceJoinKeysOnQualifiedAll"},{"name":"CompactGroupBy"},{"name":"CompactNamedExprs"},{"name":"CostBasedOptimizer"},{"name":"DataWatermarks"},{"name":"DirectRead"},{"name":"DisableAnsiCurrentRow"},{"name":"DisableAnsiImplicitCrossJoin"},{"name":"DisableAnsiInForEmptyOrNullableItemsCollections"},{"name":"DisableAnsiLike"},{"name":"DisableAnsiOptionalAs"},{"name":"DisableAnsiRankForNullableKeys"},{"name":"DisableBlockEngineEnable"},{"name":"DisableBlockEngineForce"},{"name":"DisableBogousStarInGroupByOverJoin"},{"name":"DisableCoalesceJoinKeysOnQualifiedAll"},{"name":"DisableCompactGroupBy"},{"name":"DisableCompactNamedExprs"},{"name":"DisableDistinctOverKeys"},{"name":"DisableDistinctOverWindow"},{"name":"DisableDqEngineEnable"},{"name":"DisableDqEngineForce"},{"name":"DisableEmitAggApply"},{"name":"DisableEmitStartsWith"},{"name":"DisableEmitTableSource"},{"name":"DisableEmitUnionMerge"},{"name":"DisableFilterPushdownOverJoinOptionalSide"},{"name":"DisableFlexibleTypes"},{"name":"DisableGroupByExprAfterWhere"},{"name":"DisableJsonQueryReturnsJsonDocument"},{"name":"DisableOrderedColumns"},{"name":"DisablePullUpFlatMapOverJoin"},{"name":"DisableRegexUseRe2"},{"name":"DisableRotateJoinTree"},{"name":"DisableSeqMode"},{"name":"DisableSimpleColumns"},{"name":"DisableStrictJoinKeyTypes"},{"name":"DisableUnicodeLiterals"},{"name":"DisableUnorderedResult"},{"name":"DisableUnorderedSubqueries"},{"name":"DisableUseBlocks"},{"name":"DisableValidateUnusedExprs"},{"name":"DisableWarnOnAnsiAliasShadowing"},{"name":"DisableWarnUntypedStringLiterals"},{"name":"DiscoveryMode"},{"name":"DistinctOverKeys"},{"name":"DistinctOverWindow"},{"name":"DqEngine"},{"name":"DqEngineEnable"},{"name":"DqEngineForce"},{"name":"EmitAggApply"},{"name":"EmitStartsWith"},{"name":"EmitTableSource"},{"name":"EmitUnionMerge"},{"name":"EnableSystemColumns"},{"name":"Engine"},{"name":"ErrorMsg"},{"name":"FeatureR010"},{"name":"File"},{"name":"FileOption"},{"name":"FilterPushdownOverJoinOptionalSide"},{"name":"FlexibleTypes"},{"name":"Folder"},{"name":"Greetings"},{"name":"GroupByCubeLimit"},{"name":"GroupByExprAfterWhere"},{"name":"GroupByLimit"},{"name":"JsonQueryReturnsJsonDocument"},{"name":"Library"},{"name":"OrderedColumns"},{"name":"OverrideLibrary"},{"name":"Package"},{"name":"PackageVersion"},{"name":"PathPrefix"},{"name":"PositionalUnionAll"},{"name":"PqReadBy"},{"name":"PullUpFlatMapOverJoin"},{"name":"RefSelect"},{"name":"RegexUseRe2"},{"name":"ResultRowsLimit"},{"name":"ResultSizeLimit"},{"name":"RotateJoinTree"},{"name":"RuntimeLogLevel"},{"name":"SampleSelect"},{"name":"SeqMode"},{"name":"SimpleColumns"},{"name":"StrictJoinKeyTypes"},{"name":"Udf"},{"name":"UnicodeLiterals"},{"name":"UnorderedResult"},{"name":"UnorderedSubqueries"},{"name":"UseBlocks"},{"name":"UseTablePrefixForEach"},{"name":"ValidateUnusedExprs"},{"name":"WarnOnAnsiAliasShadowing"},{"name":"WarnUnnamedColumns"},{"name":"WarnUntypedStringLiterals"},{"name":"Warning"},{"name":"WarningMsg"},{"name":"yson.AutoConvert"},{"name":"yson.CastToString"},{"name":"yson.DisableCastToString"},{"name":"yson.DisableStrict"},{"name":"yson.Strict"}] +[{"name":"yt.Annotations"},{"name":"yt.ApplyStoredConstraints"},{"name":"yt.Auth"},{"name":"yt.AutoMerge"},{"name":"yt.BatchListFolderConcurrency"},{"name":"yt.BinaryExpirationInterval"},{"name":"yt.BinaryTmpFolder"},{"name":"yt.BlockMapJoin"},{"name":"yt.BlockReaderSupportedDataTypes"},{"name":"yt.BlockReaderSupportedTypes"},{"name":"yt.BufferRowCount"},{"name":"yt.ClientMapTimeout"},{"name":"yt.ColumnGroupMode"},{"name":"yt.CombineCoreLimit"},{"name":"yt.CommonJoinCoreLimit"},{"name":"yt.CompactForDistinct"},{"name":"yt.CoreDumpPath"},{"name":"yt.DQRPCReaderInflight"},{"name":"yt.DQRPCReaderTimeout"},{"name":"yt.DataSizePerJob"},{"name":"yt.DataSizePerMapJob"},{"name":"yt.DataSizePerPartition"},{"name":"yt.DataSizePerSortJob"},{"name":"yt.DefaultCalcMemoryLimit"},{"name":"yt.DefaultCluster"},{"name":"yt.DefaultLocalityTimeout"},{"name":"yt.DefaultMapSelectivityFactor"},{"name":"yt.DefaultMaxJobFails"},{"name":"yt.DefaultMemoryDigestLowerBound"},{"name":"yt.DefaultMemoryLimit"},{"name":"yt.DefaultMemoryReserveFactor"},{"name":"yt.DefaultOperationWeight"},{"name":"yt.DefaultRuntimeCluster"},{"name":"yt.Description"},{"name":"yt.DisableFuseOperations"},{"name":"yt.DisableJobSplitting"},{"name":"yt.DisableOptimizers"},{"name":"yt.DockerImage"},{"name":"yt.DqPruneKeyFilterLambda"},{"name":"yt.DropUnusedKeysFromKeyFilter"},{"name":"yt.EnableDynamicStoreReadInDQ"},{"name":"yt.EnableFuseMapToMapReduce"},{"name":"yt.EnforceJobUtc"},{"name":"yt.ErasureCodecCpu"},{"name":"yt.ErasureCodecCpuForDq"},{"name":"yt.EvaluationTableSizeLimit"},{"name":"yt.ExpirationDeadline"},{"name":"yt.ExpirationInterval"},{"name":"yt.ExtendTableLimit"},{"name":"yt.ExtendedStatsMaxChunkCount"},{"name":"yt.ExternalTx"},{"name":"yt.ExtraTmpfsSize"},{"name":"yt.FileCacheTtl"},{"name":"yt.FmrOperationSpec"},{"name":"yt.FolderInlineDataLimit"},{"name":"yt.FolderInlineItemsLimit"},{"name":"yt.ForceInferSchema"},{"name":"yt.ForceJobSizeAdjuster"},{"name":"yt.ForceTmpSecurity"},{"name":"yt.GeobaseDownloadUrl"},{"name":"yt.HybridDqDataSizeLimitForOrdered"},{"name":"yt.HybridDqDataSizeLimitForUnordered"},{"name":"yt.HybridDqExecution"},{"name":"yt.HybridDqExecutionFallback"},{"name":"yt.IgnoreTypeV3"},{"name":"yt.IgnoreWeakSchema"},{"name":"yt.IgnoreYamrDsv"},{"name":"yt.InferSchema"},{"name":"yt.InferSchemaMode"},{"name":"yt.InferSchemaTableCountThreshold"},{"name":"yt.InflightTempTablesLimit"},{"name":"yt.IntermediateAccount"},{"name":"yt.IntermediateDataMedium"},{"name":"yt.IntermediateReplicationFactor"},{"name":"yt.JavascriptCpu"},{"name":"yt.JobBlockInput"},{"name":"yt.JobBlockInputSupportedDataTypes"},{"name":"yt.JobBlockInputSupportedTypes"},{"name":"yt.JobBlockOutput"},{"name":"yt.JobBlockOutputSupportedDataTypes"},{"name":"yt.JobBlockOutputSupportedTypes"},{"name":"yt.JobBlockTableContent"},{"name":"yt.JobEnv"},{"name":"yt.JoinAllowColumnRenames"},{"name":"yt.JoinCollectColumnarStatistics"},{"name":"yt.JoinColumnarStatisticsFetcherMode"},{"name":"yt.JoinCommonUseMapMultiOut"},{"name":"yt.JoinEnableStarJoin"},{"name":"yt.JoinMergeForce"},{"name":"yt.JoinMergeReduceJobMaxSize"},{"name":"yt.JoinMergeSetTopLevelFullSort"},{"name":"yt.JoinMergeTablesLimit"},{"name":"yt.JoinMergeUnsortedFactor"},{"name":"yt.JoinMergeUseSmallAsPrimary"},{"name":"yt.JoinUseColumnarStatistics"},{"name":"yt.JoinWaitAllInputs"},{"name":"yt.KeepTempTables"},{"name":"yt.KeyFilterForStartsWith"},{"name":"yt.LLVMMemSize"},{"name":"yt.LLVMNodeCountLimit"},{"name":"yt.LLVMPerNodeMemSize"},{"name":"yt.LayerPaths"},{"name":"yt.LocalCalcLimit"},{"name":"yt.LookupJoinLimit"},{"name":"yt.LookupJoinMaxRows"},{"name":"yt.MapJoinLimit"},{"name":"yt.MapJoinShardCount"},{"name":"yt.MapJoinShardMinRows"},{"name":"yt.MapJoinUseFlow"},{"name":"yt.MapLocalityTimeout"},{"name":"yt.MaxChunksForDqRead"},{"name":"yt.MaxColumnGroups"},{"name":"yt.MaxCpuUsageToFuseMultiOuts"},{"name":"yt.MaxExtraJobMemoryToFuseOperations"},{"name":"yt.MaxInputTables"},{"name":"yt.MaxInputTablesForSortedMerge"},{"name":"yt.MaxJobCount"},{"name":"yt.MaxKeyRangeCount"},{"name":"yt.MaxKeyWeight"},{"name":"yt.MaxOperationFiles"},{"name":"yt.MaxOutputTables"},{"name":"yt.MaxReplicationFactorToFuseMultiOuts"},{"name":"yt.MaxReplicationFactorToFuseOperations"},{"name":"yt.MaxRowWeight"},{"name":"yt.MaxSpeculativeJobCountPerTask"},{"name":"yt.MergeAdjacentPointRanges"},{"name":"yt.MinColumnGroupSize"},{"name":"yt.MinLocalityInputDataWeight"},{"name":"yt.MinPublishedAvgChunkSize"},{"name":"yt.MinTempAvgChunkSize"},{"name":"yt.NativeYtTypeCompatibility"},{"name":"yt.NetworkProject"},{"name":"yt.NightlyCompress"},{"name":"yt.OperationReaders"},{"name":"yt.OperationSpec"},{"name":"yt.OptimizeFor"},{"name":"yt.Owners"},{"name":"yt.ParallelOperationsLimit"},{"name":"yt.PartitionByConstantKeysViaMap"},{"name":"yt.Pool"},{"name":"yt.PoolTrees"},{"name":"yt.PrimaryMedium"},{"name":"yt.PruneKeyFilterLambda"},{"name":"yt.PruneQLFilterLambda"},{"name":"yt.PublishedAutoMerge"},{"name":"yt.PublishedCompressionCodec"},{"name":"yt.PublishedErasureCodec"},{"name":"yt.PublishedMedia"},{"name":"yt.PublishedPrimaryMedium"},{"name":"yt.PublishedReplicationFactor"},{"name":"yt.PythonCpu"},{"name":"yt.QueryCacheChunkLimit"},{"name":"yt.QueryCacheIgnoreTableRevision"},{"name":"yt.QueryCacheMode"},{"name":"yt.QueryCacheSalt"},{"name":"yt.QueryCacheTtl"},{"name":"yt.QueryCacheUseExpirationTimeout"},{"name":"yt.QueryCacheUseForCalc"},{"name":"yt.ReduceLocalityTimeout"},{"name":"yt.ReleaseTempData"},{"name":"yt.ReportEquiJoinStats"},{"name":"yt.RuntimeCluster"},{"name":"yt.RuntimeClusterSelection"},{"name":"yt.SamplingIoBlockSize"},{"name":"yt.SchedulingTag"},{"name":"yt.SchedulingTagFilter"},{"name":"yt.ScriptCpu"},{"name":"yt.SortLocalityTimeout"},{"name":"yt.StartedBy"},{"name":"yt.StaticPool"},{"name":"yt.SuspendIfAccountLimitExceeded"},{"name":"yt.SwitchLimit"},{"name":"yt.TableContentColumnarStatistics"},{"name":"yt.TableContentCompressLevel"},{"name":"yt.TableContentDeliveryMode"},{"name":"yt.TableContentLocalExecution"},{"name":"yt.TableContentMaxChunksForNativeDelivery"},{"name":"yt.TableContentMaxInputTables"},{"name":"yt.TableContentMinAvgChunkSize"},{"name":"yt.TableContentTmpFolder"},{"name":"yt.TableContentUseSkiff"},{"name":"yt.TablesTmpFolder"},{"name":"yt.TempTablesTtl"},{"name":"yt.TemporaryAutoMerge"},{"name":"yt.TemporaryCompressionCodec"},{"name":"yt.TemporaryErasureCodec"},{"name":"yt.TemporaryMedia"},{"name":"yt.TemporaryPrimaryMedium"},{"name":"yt.TemporaryReplicationFactor"},{"name":"yt.TentativePoolTrees"},{"name":"yt.TentativeTreeEligibilityMaxJobDurationRatio"},{"name":"yt.TentativeTreeEligibilityMinJobDuration"},{"name":"yt.TentativeTreeEligibilitySampleJobCount"},{"name":"yt.TmpFolder"},{"name":"yt.TopSortMaxLimit"},{"name":"yt.TopSortRowMultiplierPerJob"},{"name":"yt.TopSortSizePerJob"},{"name":"yt.UseAggPhases"},{"name":"yt.UseColumnGroupsFromInputTables"},{"name":"yt.UseColumnarStatistics"},{"name":"yt.UseDefaultTentativePoolTrees"},{"name":"yt.UseFlow"},{"name":"yt.UseIntermediateSchema"},{"name":"yt.UseIntermediateStreams"},{"name":"yt.UseNativeDescSort"},{"name":"yt.UseNativeDynamicTableRead"},{"name":"yt.UseNativeYtTypes"},{"name":"yt.UseNewPredicateExtraction"},{"name":"yt.UsePartitionsByKeysForFinalAgg"},{"name":"yt.UseQLFilter"},{"name":"yt.UseRPCReaderInDQ"},{"name":"yt.UseSkiff"},{"name":"yt.UseSystemColumns"},{"name":"yt.UseTmpfs"},{"name":"yt.UseTypeV2"},{"name":"yt.UseYqlRowSpecCompactForm"},{"name":"yt.UserSlots"},{"name":"yt.ViewIsolation"},{"name":"yt.WideFlowLimit"},{"name":"dq.AggregateStatsByStage"},{"name":"dq.AnalyticsHopping"},{"name":"dq.AnalyzeQuery"},{"name":"dq.ChannelBufferSize"},{"name":"dq.ChunkSizeLimit"},{"name":"dq.CollectCoreDumps"},{"name":"dq.ComputeActorType"},{"name":"dq.DataSizePerJob"},{"name":"dq.DisableCheckpoints"},{"name":"dq.DisableLLVMForBlockStages"},{"name":"dq.EnableChannelStats"},{"name":"dq.EnableComputeActor"},{"name":"dq.EnableDqReplicate"},{"name":"dq.EnableFullResultWrite"},{"name":"dq.EnableInsert"},{"name":"dq.EnableSpillingInChannels"},{"name":"dq.EnableSpillingNodes"},{"name":"dq.EnableStrip"},{"name":"dq.ExportStats"},{"name":"dq.FallbackPolicy"},{"name":"dq.HashJoinMode"},{"name":"dq.HashShuffleMaxTasks"},{"name":"dq.HashShuffleTasksRatio"},{"name":"dq.MaxDataSizePerJob"},{"name":"dq.MaxDataSizePerQuery"},{"name":"dq.MaxNetworkRetries"},{"name":"dq.MaxRetries"},{"name":"dq.MaxTasksPerOperation"},{"name":"dq.MaxTasksPerStage"},{"name":"dq.MemoryLimit"},{"name":"dq.OptLLVM"},{"name":"dq.OutputChunkMaxSize"},{"name":"dq.ParallelOperationsLimit"},{"name":"dq.PingTimeoutMs"},{"name":"dq.PullRequestTimeoutMs"},{"name":"dq.QueryTimeout"},{"name":"dq.RetryBackoffMs"},{"name":"dq.Scheduler"},{"name":"dq.SpillingEngine"},{"name":"dq.SplitStageOnDqReplicate"},{"name":"dq.TaskRunnerStats"},{"name":"dq.UseAggPhases"},{"name":"dq.UseBlockReader"},{"name":"dq.UseFastPickleTransport"},{"name":"dq.UseFinalizeByKey"},{"name":"dq.UseGraceJoinCoreForMap"},{"name":"dq.UseOOBTransport"},{"name":"dq.UseSimpleYtReader"},{"name":"dq.UseWideBlockChannels"},{"name":"dq.UseWideChannels"},{"name":"dq.WatermarksEnableIdlePartitions"},{"name":"dq.WatermarksGranularityMs"},{"name":"dq.WatermarksLateArrivalDelayMs"},{"name":"dq.WatermarksMode"},{"name":"dq.WorkerFilter"},{"name":"dq.WorkersPerOperation"},{"name":"AllowDotInAlias"},{"name":"AllowUnnamedColumns"},{"name":"AnsiCurrentRow"},{"name":"AnsiImplicitCrossJoin"},{"name":"AnsiInForEmptyOrNullableItemsCollections"},{"name":"AnsiLike"},{"name":"AnsiOptionalAs"},{"name":"AnsiRankForNullableKeys"},{"name":"AutoCommit"},{"name":"BlockEngine"},{"name":"BlockEngineEnable"},{"name":"BlockEngineForce"},{"name":"BogousStarInGroupByOverJoin"},{"name":"CheckedOps"},{"name":"ClassicDivision"},{"name":"CoalesceJoinKeysOnQualifiedAll"},{"name":"CompactGroupBy"},{"name":"CompactNamedExprs"},{"name":"CostBasedOptimizer"},{"name":"DataWatermarks"},{"name":"DirectRead"},{"name":"DisableAnsiCurrentRow"},{"name":"DisableAnsiImplicitCrossJoin"},{"name":"DisableAnsiInForEmptyOrNullableItemsCollections"},{"name":"DisableAnsiLike"},{"name":"DisableAnsiOptionalAs"},{"name":"DisableAnsiRankForNullableKeys"},{"name":"DisableBlockEngineEnable"},{"name":"DisableBlockEngineForce"},{"name":"DisableBogousStarInGroupByOverJoin"},{"name":"DisableCoalesceJoinKeysOnQualifiedAll"},{"name":"DisableCompactGroupBy"},{"name":"DisableCompactNamedExprs"},{"name":"DisableDistinctOverKeys"},{"name":"DisableDistinctOverWindow"},{"name":"DisableDqEngineEnable"},{"name":"DisableDqEngineForce"},{"name":"DisableEmitAggApply"},{"name":"DisableEmitStartsWith"},{"name":"DisableEmitTableSource"},{"name":"DisableEmitUnionMerge"},{"name":"DisableFailOnGroupByExprOverride"},{"name":"DisableFilterPushdownOverJoinOptionalSide"},{"name":"DisableFlexibleTypes"},{"name":"DisableGroupByExprAfterWhere"},{"name":"DisableJsonQueryReturnsJsonDocument"},{"name":"DisableOrderedColumns"},{"name":"DisablePullUpFlatMapOverJoin"},{"name":"DisableRegexUseRe2"},{"name":"DisableRotateJoinTree"},{"name":"DisableSeqMode"},{"name":"DisableSimpleColumns"},{"name":"DisableStrictJoinKeyTypes"},{"name":"DisableUnicodeLiterals"},{"name":"DisableUnorderedResult"},{"name":"DisableUnorderedSubqueries"},{"name":"DisableUseBlocks"},{"name":"DisableValidateUnusedExprs"},{"name":"DisableWarnOnAnsiAliasShadowing"},{"name":"DisableWarnUntypedStringLiterals"},{"name":"DiscoveryMode"},{"name":"DistinctOverKeys"},{"name":"DistinctOverWindow"},{"name":"DqEngine"},{"name":"DqEngineEnable"},{"name":"DqEngineForce"},{"name":"EmitAggApply"},{"name":"EmitStartsWith"},{"name":"EmitTableSource"},{"name":"EmitUnionMerge"},{"name":"EnableSystemColumns"},{"name":"Engine"},{"name":"ErrorMsg"},{"name":"FailOnGroupByExprOverride"},{"name":"FeatureR010"},{"name":"File"},{"name":"FileOption"},{"name":"FilterPushdownOverJoinOptionalSide"},{"name":"FlexibleTypes"},{"name":"Folder"},{"name":"Greetings"},{"name":"GroupByCubeLimit"},{"name":"GroupByExprAfterWhere"},{"name":"GroupByLimit"},{"name":"JsonQueryReturnsJsonDocument"},{"name":"Library"},{"name":"OrderedColumns"},{"name":"OverrideLibrary"},{"name":"Package"},{"name":"PackageVersion"},{"name":"PathPrefix"},{"name":"PositionalUnionAll"},{"name":"PqReadBy"},{"name":"PullUpFlatMapOverJoin"},{"name":"RefSelect"},{"name":"RegexUseRe2"},{"name":"ResultRowsLimit"},{"name":"ResultSizeLimit"},{"name":"RotateJoinTree"},{"name":"RuntimeLogLevel"},{"name":"SampleSelect"},{"name":"SeqMode"},{"name":"SimpleColumns"},{"name":"StrictJoinKeyTypes"},{"name":"Udf"},{"name":"UnicodeLiterals"},{"name":"UnorderedResult"},{"name":"UnorderedSubqueries"},{"name":"UseBlocks"},{"name":"UseTablePrefixForEach"},{"name":"ValidateUnusedExprs"},{"name":"WarnOnAnsiAliasShadowing"},{"name":"WarnUnnamedColumns"},{"name":"WarnUntypedStringLiterals"},{"name":"Warning"},{"name":"WarningMsg"},{"name":"yson.AutoConvert"},{"name":"yson.CastToString"},{"name":"yson.DisableCastToString"},{"name":"yson.DisableStrict"},{"name":"yson.Strict"}] diff --git a/yql/essentials/docs/en/changelog/2025.01.md b/yql/essentials/docs/en/changelog/2025.01.md new file mode 100644 index 00000000000..5efc0368161 --- /dev/null +++ b/yql/essentials/docs/en/changelog/2025.01.md @@ -0,0 +1 @@ +This initial version contains all features as of early 2025. diff --git a/yql/essentials/docs/en/changelog/2025.02.md b/yql/essentials/docs/en/changelog/2025.02.md new file mode 100644 index 00000000000..ef0666564ea --- /dev/null +++ b/yql/essentials/docs/en/changelog/2025.02.md @@ -0,0 +1,29 @@ +## Changing the visibility of aliases entered in GROUP BY expr AS alias for WHERE {#group-by-expr-alias-where} + +Since this version, in a query like + +```yql +SELECT foo, ... WHERE foo = 1 GROUP BY expr AS foo +``` + +the value of foo in `WHERE` is taken from the original table, and not equal to `expr` as it was previously. + +To get an error from the query if it changes behavior in this version, you need to add + +```yql +PRAGMA FailOnGroupByExprOverride; +``` + +If you want to keep the previous behavior, you need to transform the query into this form: + +```yql +SELECT foo, ... FROM (SELECT expr AS foo ...) WHERE foo = 1 GROUP BY foo +``` + +If you need to prepare the query for the transition to a new version, it is enough to remove the shadowing of the column name by the alias: + +```yql +SELECT foo_new, ... WHERE foo = 1 GROUP BY expr AS foo_new +``` + +## TODO diff --git a/yql/essentials/docs/en/changelog/index.md b/yql/essentials/docs/en/changelog/index.md new file mode 100644 index 00000000000..9d82ceb39c8 --- /dev/null +++ b/yql/essentials/docs/en/changelog/index.md @@ -0,0 +1,27 @@ +## Changes in YQL versions + +This section contains a list of changes in different versions of the YQL + +## General description of YQL versions + +The goal of language versioning is a controlled and user-safe evolution of the language, within which it is possible to: + +* add new features; + +* change default values for pragmas or perform other non-backward-compatible changes; + +* remove obsolete features. + +The starting version of the language is `2025.01`. + +Once a year, a new version of the language is released, called `YEAR.X`, for example `2025.01`. Other versions in the same year will increase the minor version number (`YEAR.02`, etc.). + +For each version of the type `YEAR.X` **support is guaranteed for three years with the preservation of semantics and bug fixes**. + +When version `YEAR+2.1` is released, a warning is issued for all versions of the type `YEAR.X` that they will soon cease to be supported. + +When version `YEAR+3.1` is released, a warning is issued for all versions of the type `YEAR.X` that they are not supported and query execution is not guaranteed. + +When specifying a version of `YEAR.X` greater than what is currently available in some service/library/tool, a query error is issued. + +When each version is released, the documentation in the changelog indicates the changes included in this version and recommendations for migration. diff --git a/yql/essentials/docs/en/changelog/toc_i.yaml b/yql/essentials/docs/en/changelog/toc_i.yaml new file mode 100644 index 00000000000..968c0814ab5 --- /dev/null +++ b/yql/essentials/docs/en/changelog/toc_i.yaml @@ -0,0 +1,7 @@ +items: +- name: Overview + href: index.md +- name: 2025.01 + href: 2025.01.md +- name: 2025.02 + href: 2025.02.md diff --git a/yql/essentials/docs/en/index.md b/yql/essentials/docs/en/index.md index 77431a8793c..35762072ea6 100644 --- a/yql/essentials/docs/en/index.md +++ b/yql/essentials/docs/en/index.md @@ -8,3 +8,4 @@ This documentation section contains the YQL reference that includes the sections - [Syntax](syntax/index.md) with a full list of YQL commands - [Built-in functions](builtins/index.md) with a description of the available built-in functions - [Recipes](recipes/index.md) with a description of recipes for various tasks +- [Changelog](changelog/index.md) of YQL diff --git a/yql/essentials/docs/en/syntax/select/index.md b/yql/essentials/docs/en/syntax/select/index.md index 656e2bfba4e..47b61a68d84 100644 --- a/yql/essentials/docs/en/syntax/select/index.md +++ b/yql/essentials/docs/en/syntax/select/index.md @@ -24,7 +24,7 @@ The `SELECT` query result is calculated as follows: * Apply [SAMPLE](sample.md)/[TABLESAMPLE](sample.md) to input tables. * Execute [FLATTEN COLUMNS](../flatten.md#flatten-columns) or [FLATTEN BY](../flatten.md); aliases set in `FLATTEN BY` become visible after this point. * Execute every [JOIN](../join.md). -* Add to (or replace in) the data the columns listed in [GROUP BY ... AS ...](../group_by.md). +* Add to (or replace in) the data the columns listed in [GROUP BY ... AS ...](../group_by.md) (this clause executes after `WHERE` since version [2025.02](../../changelog/2025.02.md#group-by-expr-alias-where)). * Execute [WHERE](where.md) - discard all the data mismatching the predicate. * Execute [GROUP BY](../group_by.md), evaluate aggregate functions. * Apply the filter [HAVING](../group_by.md#having). diff --git a/yql/essentials/docs/en/toc_i.yaml b/yql/essentials/docs/en/toc_i.yaml index d248590877b..c38b2c16333 100644 --- a/yql/essentials/docs/en/toc_i.yaml +++ b/yql/essentials/docs/en/toc_i.yaml @@ -7,3 +7,5 @@ items: include: { mode: link, path: builtins/toc_i.yaml } - name: Recipes include: { mode: link, path: recipes/toc_i.yaml } +- name: Changelog + include: { mode: link, path: changelog/toc_i.yaml } diff --git a/yql/essentials/docs/ru/changelog/2025.01.md b/yql/essentials/docs/ru/changelog/2025.01.md new file mode 100644 index 00000000000..e18d9d6e622 --- /dev/null +++ b/yql/essentials/docs/ru/changelog/2025.01.md @@ -0,0 +1 @@ +Эта стартовая версия содержит все фичи на начало 2025 года.
\ No newline at end of file diff --git a/yql/essentials/docs/ru/changelog/2025.02.md b/yql/essentials/docs/ru/changelog/2025.02.md new file mode 100644 index 00000000000..c09f30ca5aa --- /dev/null +++ b/yql/essentials/docs/ru/changelog/2025.02.md @@ -0,0 +1,29 @@ +## Изменение видимости алиасов, введенных в GROUP BY expr AS alias для WHERE {#group-by-expr-alias-where} + +Начиная с этой версии в запросе вида + +```yql +SELECT foo, ... WHERE foo = 1 GROUP BY expr AS foo +``` + +значение foo в `WHERE` берется из исходной таблицы, а не равно `expr`, как было ранее. + +Чтобы получить ошибку запроса, если он изменит поведение в этой версии, необходимо добавить + +```yql +PRAGMA FailOnGroupByExprOverride; +``` + +Если необходимо сохранить предыдущее поведение, запрос нужно преобразовать в такую форму: + +```yql +SELECT foo, ... FROM (SELECT expr AS foo ...) WHERE foo = 1 GROUP BY foo +``` + +Если нужно подготовить запрос к переходу на новую версию, достаточно убрать затенение alias-ом имени колонки: + +```yql +SELECT foo_new, ... WHERE foo = 1 GROUP BY expr AS foo_new +``` + +## TODO diff --git a/yql/essentials/docs/ru/changelog/index.md b/yql/essentials/docs/ru/changelog/index.md new file mode 100644 index 00000000000..00231093d0c --- /dev/null +++ b/yql/essentials/docs/ru/changelog/index.md @@ -0,0 +1,27 @@ +## Изменения в версиях YQL + +Этот раздел содержит список изменений в различных версиях YQL + +## Общее описание версий YQL + +Цель версионирования языка - контролируемая и безопасная для пользователей эволюция языка, в рамках которой можно: + +* добавлять новые фичи; + +* менять значения по умолчанию у прагм или выполнять другие не обратно совместимые изменения; + +* удалять устаревшие фичи. + +Стартовая версия языка - `2025.01`. + +Раз в год выпускается новая версия языка, именуемая как `YEAR.X`, например `2025.01`. Другие версии в тот же год будут увеличивать младший номер версии (`YEAR.02` и т.п.). + +Для каждой версии вида `YEAR.X` **гарантируется ее поддержка в течении трех лет с сохранением семантики и багфиксами**. + +При выходе версии `YEAR+2.1` выдается предупреждение для всех версий вида `YEAR.X` о том, что они скоро перестанут поддерживаться. + +При выходе версии `YEAR+3.1` выдается предупреждение для всех версий вида `YEAR.X` о том, что они не поддерживаются и выполнение запросов не гарантируется. + +При указании версии `YEAR.X` большей, чем доступно в некотором сервисе/библиотеке/инструменте на текущий момент, выдается ошибка запроса. + +При релизе каждой версии в changelog-е в документации указываются изменения, вошедшие в эту версию и рекомендации по миграции. diff --git a/yql/essentials/docs/ru/changelog/toc_i.yaml b/yql/essentials/docs/ru/changelog/toc_i.yaml new file mode 100644 index 00000000000..9a1dac426db --- /dev/null +++ b/yql/essentials/docs/ru/changelog/toc_i.yaml @@ -0,0 +1,7 @@ +items: +- name: Обзор + href: index.md +- name: 2025.01 + href: 2025.01.md +- name: 2025.02 + href: 2025.02.md diff --git a/yql/essentials/docs/ru/index.md b/yql/essentials/docs/ru/index.md index 1d3314f841e..9168ae55ac9 100644 --- a/yql/essentials/docs/ru/index.md +++ b/yql/essentials/docs/ru/index.md @@ -9,3 +9,4 @@ - [Синтаксис](syntax/index.md) с полным перечнем команд YQL - [Встроенные функции](builtins/index.md) с описанием доступных встроенных функций - [Рецепты](recipes/index.md) с описанием рецептов для различных задача +- [Список изменений](changelog/index.md) YQL diff --git a/yql/essentials/docs/ru/syntax/select/index.md b/yql/essentials/docs/ru/syntax/select/index.md index bee4e38d498..f0d3814907c 100644 --- a/yql/essentials/docs/ru/syntax/select/index.md +++ b/yql/essentials/docs/ru/syntax/select/index.md @@ -23,7 +23,7 @@ SELECT 2 + 2; * к входным таблицам применяется [SAMPLE](sample.md) / [TABLESAMPLE](sample.md) * выполняется [FLATTEN COLUMNS](../flatten.md#flatten-columns) или [FLATTEN BY](../flatten.md); алиасы, заданные во `FLATTEN BY`, становятся видны после этой точки; * выполняются все [JOIN](../join.md); -* к полученным данным добавляются (или заменяются) колонки, заданные в [GROUP BY ... AS ...](../group_by.md); +* к полученным данным добавляются (или заменяются) колонки, заданные в [GROUP BY ... AS ...](../group_by.md) (выполняется после `WHERE` начиная с версии [2025.02](../../changelog/2025.02.md#group-by-expr-alias-where)). * выполняется [WHERE](where.md) - все данные не удовлетворяющие предикату отфильтровываются; * выполняется [GROUP BY](../group_by.md), вычисляются значения агрегатных функций; * выполняется фильтрация [HAVING](../group_by.md#having); diff --git a/yql/essentials/docs/ru/toc_i.yaml b/yql/essentials/docs/ru/toc_i.yaml index aa8b7a95dad..caf27f7e5d9 100644 --- a/yql/essentials/docs/ru/toc_i.yaml +++ b/yql/essentials/docs/ru/toc_i.yaml @@ -7,3 +7,5 @@ items: include: { mode: link, path: builtins/toc_i.yaml } - name: Рецепты include: { mode: link, path: recipes/toc_i.yaml } +- name: Список изменений + include: { mode: link, path: changelog/toc_i.yaml } diff --git a/yql/essentials/providers/common/proto/gateways_config.proto b/yql/essentials/providers/common/proto/gateways_config.proto index 3bb3da5be64..6624cba8bae 100644 --- a/yql/essentials/providers/common/proto/gateways_config.proto +++ b/yql/essentials/providers/common/proto/gateways_config.proto @@ -679,8 +679,13 @@ message TIcebergCatalog { message THadoop { } - // Hive Iceberg Catalog which is based on a Hive Metastore + // todo: remove message THive { + optional string uri = 1; + } + + // Hive Iceberg Catalog which is based on a Hive Metastore + message THiveMetastore { // Location of a hive metastore // e.g., thrift://host:9083/ optional string uri = 1; @@ -688,7 +693,9 @@ message TIcebergCatalog { oneof payload { THadoop hadoop = 1; + // todo: remove THive hive = 2; + THiveMetastore hive_metastore = 3; } } diff --git a/yql/essentials/providers/common/udf_resolve/ya.make b/yql/essentials/providers/common/udf_resolve/ya.make index 65fa463b8c4..fec4639561f 100644 --- a/yql/essentials/providers/common/udf_resolve/ya.make +++ b/yql/essentials/providers/common/udf_resolve/ya.make @@ -9,6 +9,7 @@ SRCS( yql_simple_udf_resolver.h yql_udf_resolver_with_index.cpp yql_udf_resolver_with_index.h + yql_udf_resolver_logger.cpp ) PEERDIR( diff --git a/yql/essentials/providers/common/udf_resolve/yql_outproc_udf_resolver.cpp b/yql/essentials/providers/common/udf_resolve/yql_outproc_udf_resolver.cpp index 778dfc16388..9858c6ee256 100644 --- a/yql/essentials/providers/common/udf_resolve/yql_outproc_udf_resolver.cpp +++ b/yql/essentials/providers/common/udf_resolve/yql_outproc_udf_resolver.cpp @@ -4,7 +4,6 @@ #include <yql/essentials/providers/common/proto/udf_resolver.pb.h> #include <yql/essentials/providers/common/schema/expr/yql_expr_schema.h> -#include <yql/essentials/core/yql_holding_file_storage.h> #include <yql/essentials/core/yql_type_annotation.h> #include <yql/essentials/utils/log/log.h> #include <yql/essentials/utils/retry.h> @@ -139,7 +138,7 @@ public: return FunctionRegistry_->IsLoadedUdfModule(moduleName); } - bool LoadMetadata(const TVector<TImport*>& imports, const TVector<TFunction*>& functions, TExprContext& ctx, NUdf::ELogLevel logLevel) const override { + bool LoadMetadata(const TVector<TImport*>& imports, const TVector<TFunction*>& functions, TExprContext& ctx, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const override { THashSet<TString> requiredLoadedModules; THashSet<TString> requiredExternalModules; TVector<TFunction*> loadedFunctions; @@ -166,7 +165,6 @@ public: TResolve request; request.SetRuntimeLogLevel(static_cast<ui32>(logLevel)); TVector<TImport*> usedImports; - THoldingFileStorage holdingFileStorage(FileStorage_); THolder<TFilesBox> filesBox = CreateFilesBoxOverFileStorageTemp(); THashMap<TString, TImport*> path2LoadedImport; @@ -194,7 +192,7 @@ public: } try { - LoadImport(holdingFileStorage, *filesBox, *import, request); + LoadImport(storage, *filesBox, *import, request); usedImports.push_back(import); } catch (const std::exception& e) { ctx.AddError(ExceptionToIssue(e)); @@ -247,17 +245,16 @@ public: return !hasErrors; } - TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel) const override { + TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const override { TResolve request; request.SetRuntimeLogLevel(static_cast<ui32>(logLevel)); - THoldingFileStorage holdingFileStorage(FileStorage_); THolder<TFilesBox> filesBox = CreateFilesBoxOverFileStorageTemp(); Y_DEFER { filesBox->Destroy(); }; for (auto import : imports) { - LoadImport(holdingFileStorage, *filesBox, import, request); + LoadImport(storage, *filesBox, import, request); } return RunResolverAndParseResult(request, { "--discover-proto" }, *filesBox); diff --git a/yql/essentials/providers/common/udf_resolve/yql_simple_udf_resolver.cpp b/yql/essentials/providers/common/udf_resolve/yql_simple_udf_resolver.cpp index 9ec1aa2b52c..8b19fdc1d85 100644 --- a/yql/essentials/providers/common/udf_resolve/yql_simple_udf_resolver.cpp +++ b/yql/essentials/providers/common/udf_resolve/yql_simple_udf_resolver.cpp @@ -51,7 +51,7 @@ public: } bool LoadMetadata(const TVector<TImport*>& imports, - const TVector<TFunction*>& functions, TExprContext& ctx, NUdf::ELogLevel logLevel) const override { + const TVector<TFunction*>& functions, TExprContext& ctx, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const override { with_lock(Lock_) { bool hasErrors = false; @@ -68,7 +68,6 @@ public: } } - THoldingFileStorage holdingFileStorage(FileStorage_); auto newRegistry = FunctionRegistry_->Clone(); THashMap<std::pair<TString, TString>, THashSet<TString>> cachedModules; for (auto import: imports) { @@ -91,7 +90,7 @@ public: try { THashSet<TString> modules; if (FileStorage_) { - auto link = holdingFileStorage.FreezeFile(*import->Block); + auto link = storage.FreezeFile(*import->Block); auto path = link->GetPath().GetPath(); auto [it, inserted] = cachedModules.emplace(std::make_pair(path, customUdfPrefix), THashSet<TString>()); if (inserted) { @@ -141,7 +140,7 @@ public: } } - TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel) const override { + TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel, THoldingFileStorage&) const override { Y_UNUSED(imports); Y_UNUSED(logLevel); ythrow yexception() << "LoadRichMetadata is not supported in SimpleUdfResolver"; diff --git a/yql/essentials/providers/common/udf_resolve/yql_udf_resolver_logger.cpp b/yql/essentials/providers/common/udf_resolve/yql_udf_resolver_logger.cpp new file mode 100644 index 00000000000..5cb14c7619c --- /dev/null +++ b/yql/essentials/providers/common/udf_resolve/yql_udf_resolver_logger.cpp @@ -0,0 +1,83 @@ +#include "yql_udf_resolver_logger.h" + +#include <yql/essentials/core/yql_user_data_storage.h> + +#include <util/stream/file.h> +#include <util/string/builder.h> +#include <util/datetime/cputimer.h> + +namespace { +using namespace NYql; + +class TUdfResolverWithLoggerDecorator : public IUdfResolver { +public: + TUdfResolverWithLoggerDecorator(IUdfResolver::TPtr underlying, const TString& path, const TString& sessionId) + : Underlying_(underlying), Out_(TFile(path, WrOnly | ForAppend)), SessionId_(sessionId) {} + + TMaybe<TFilePathWithMd5> GetSystemModulePath(const TStringBuf& moduleName) const override { + return Underlying_->GetSystemModulePath(moduleName); + } + + bool LoadMetadata( + const TVector<TImport*>& imports, const TVector<TFunction*>& functions, + TExprContext& ctx, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const override + { + TSimpleTimer t; + auto result = Underlying_->LoadMetadata(imports, functions, ctx, logLevel, storage); + auto runningTime = t.Get().MilliSeconds(); + + TStringBuilder sb; + sb << SessionId_ << " LoadMetadata with imports ("; + for (auto& e: imports) { + if (!e || !e->Block) { + continue; + } + auto frozen = e->Block->Type != EUserDataType::URL ? e->Block->FrozenFile : storage.GetFrozenBlock(*e->Block); + if (!frozen) { + continue; + } + sb << " " << frozen->GetMd5() << ":" << frozen->GetSize(); + } + sb << ") took " << runningTime << " ms\n"; + Out_ << TString(sb); + return result; + } + + TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const override { + TSimpleTimer t; + auto result = Underlying_->LoadRichMetadata(imports, logLevel, storage); + auto runningTime = t.Get().MilliSeconds(); + + TStringBuilder sb; + sb << SessionId_ << " LoadRichMetadata with imports ("; + for (auto& e: imports) { + if (!e.Block) { + continue; + } + auto frozen = e.Block->Type != EUserDataType::URL ? e.Block->FrozenFile : storage.GetFrozenBlock(*e.Block); + if (!frozen) { + continue; + } + sb << " " << frozen->GetMd5() << ":" << frozen->GetSize(); + } + sb << ") took " << runningTime << " ms\n"; + Out_ << TString(sb); + return result; + } + + bool ContainsModule(const TStringBuf& moduleName) const override { + return Underlying_->ContainsModule(moduleName); + } +private: + IUdfResolver::TPtr Underlying_; + mutable TUnbufferedFileOutput Out_; + TString SessionId_; +}; + +} + +namespace NYql::NCommon { +IUdfResolver::TPtr CreateUdfResolverDecoratorWithLogger(IUdfResolver::TPtr underlying, const TString& path, const TString& sessionId) { + return new TUdfResolverWithLoggerDecorator(underlying, path, sessionId); +} +} diff --git a/yql/essentials/providers/common/udf_resolve/yql_udf_resolver_logger.h b/yql/essentials/providers/common/udf_resolve/yql_udf_resolver_logger.h new file mode 100644 index 00000000000..f899cc46e65 --- /dev/null +++ b/yql/essentials/providers/common/udf_resolve/yql_udf_resolver_logger.h @@ -0,0 +1,10 @@ +#pragma once + +#include <yql/essentials/core/yql_udf_index.h> +#include <yql/essentials/core/file_storage/file_storage.h> + +namespace NYql::NCommon { + +IUdfResolver::TPtr CreateUdfResolverDecoratorWithLogger(IUdfResolver::TPtr underlying, const TString& path, const TString& sessionId); + +} // namespace NYql::NCommon diff --git a/yql/essentials/providers/common/udf_resolve/yql_udf_resolver_with_index.cpp b/yql/essentials/providers/common/udf_resolve/yql_udf_resolver_with_index.cpp index 689962c4e2e..3892de463e7 100644 --- a/yql/essentials/providers/common/udf_resolve/yql_udf_resolver_with_index.cpp +++ b/yql/essentials/providers/common/udf_resolve/yql_udf_resolver_with_index.cpp @@ -79,7 +79,7 @@ public: } bool LoadMetadata(const TVector<TImport*>& imports, const TVector<TFunction*>& functions, - TExprContext& ctx, NUdf::ELogLevel logLevel) const override { + TExprContext& ctx, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const override { with_lock(Lock_) { bool hasErrors = false; THashSet<TString> requiredModules; @@ -106,12 +106,12 @@ public: fallbackImports.insert(fallbackImports.end(), additionalImports.begin(), additionalImports.end()); - return Fallback_->LoadMetadata(fallbackImports, fallbackFunctions, ctx, logLevel) && !hasErrors; + return Fallback_->LoadMetadata(fallbackImports, fallbackFunctions, ctx, logLevel, storage) && !hasErrors; } } - TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel) const override { - return Fallback_->LoadRichMetadata(imports, logLevel); + TResolveResult LoadRichMetadata(const TVector<TImport>& imports, NUdf::ELogLevel logLevel, THoldingFileStorage& storage) const override { + return Fallback_->LoadRichMetadata(imports, logLevel, storage); } bool ContainsModule(const TStringBuf& moduleName) const override { diff --git a/yql/essentials/sql/v1/context.cpp b/yql/essentials/sql/v1/context.cpp index 7f3d5433b96..ae313a171e1 100644 --- a/yql/essentials/sql/v1/context.cpp +++ b/yql/essentials/sql/v1/context.cpp @@ -70,6 +70,7 @@ THashMap<TStringBuf, TPragmaField> CTX_PRAGMA_FIELDS = { {"SeqMode", &TContext::SeqMode}, {"DistinctOverKeys", &TContext::DistinctOverKeys}, {"GroupByExprAfterWhere", &TContext::GroupByExprAfterWhere}, + {"FailOnGroupByExprOverride", &TContext::FailOnGroupByExprOverride}, }; typedef TMaybe<bool> TContext::*TPragmaMaybeField; diff --git a/yql/essentials/sql/v1/context.h b/yql/essentials/sql/v1/context.h index e3f70f7515e..14314c0a314 100644 --- a/yql/essentials/sql/v1/context.h +++ b/yql/essentials/sql/v1/context.h @@ -374,6 +374,7 @@ namespace NSQLTranslationV1 { bool SeqMode = false; bool DistinctOverKeys = false; bool GroupByExprAfterWhere = false; + bool FailOnGroupByExprOverride = false; bool EmitUnionMerge = false; TVector<size_t> ForAllStatementsParts; diff --git a/yql/essentials/sql/v1/source.cpp b/yql/essentials/sql/v1/source.cpp index 28afe17d9c3..1b639dbc5d9 100644 --- a/yql/essentials/sql/v1/source.cpp +++ b/yql/essentials/sql/v1/source.cpp @@ -488,12 +488,15 @@ TNodePtr ISource::BuildFlattenColumns(const TString& label) { namespace { -TNodePtr BuildLambdaBodyForExprAliases(TPosition pos, const TVector<TNodePtr>& exprs) { +TNodePtr BuildLambdaBodyForExprAliases(TPosition pos, const TVector<TNodePtr>& exprs, bool override) { auto structObj = BuildAtom(pos, "row", TNodeFlags::Default); for (const auto& exprNode: exprs) { const auto name = exprNode->GetLabel(); YQL_ENSURE(name); - structObj = structObj->Y("ForceRemoveMember", structObj, structObj->Q(name)); + if (override) { + structObj = structObj->Y("ForceRemoveMember", structObj, structObj->Q(name)); + } + if (dynamic_cast<const TSessionWindow*>(exprNode.Get())) { continue; } @@ -515,12 +518,12 @@ TNodePtr ISource::BuildPreaggregatedMap(TContext& ctx) { TNodePtr res; if (groupByExprs) { - auto body = BuildLambdaBodyForExprAliases(Pos, groupByExprs); + auto body = BuildLambdaBodyForExprAliases(Pos, groupByExprs, ctx.GroupByExprAfterWhere || !ctx.FailOnGroupByExprOverride); res = Y("FlatMap", "core", BuildLambda(Pos, Y("row"), body)); } if (distinctAggrExprs) { - auto body = BuildLambdaBodyForExprAliases(Pos, distinctAggrExprs); + auto body = BuildLambdaBodyForExprAliases(Pos, distinctAggrExprs, ctx.GroupByExprAfterWhere || !ctx.FailOnGroupByExprOverride); auto lambda = BuildLambda(Pos, Y("row"), body); res = res ? Y("FlatMap", res, lambda) : Y("FlatMap", "core", lambda); } @@ -530,7 +533,7 @@ TNodePtr ISource::BuildPreaggregatedMap(TContext& ctx) { TNodePtr ISource::BuildPreFlattenMap(TContext& ctx) { Y_UNUSED(ctx); YQL_ENSURE(IsFlattenByExprs()); - return BuildLambdaBodyForExprAliases(Pos, Expressions(EExprSeat::FlattenByExpr)); + return BuildLambdaBodyForExprAliases(Pos, Expressions(EExprSeat::FlattenByExpr), true); } TNodePtr ISource::BuildPrewindowMap(TContext& ctx) { diff --git a/yql/essentials/sql/v1/sql_query.cpp b/yql/essentials/sql/v1/sql_query.cpp index d64a7bf8d61..c9ea302c8c7 100644 --- a/yql/essentials/sql/v1/sql_query.cpp +++ b/yql/essentials/sql/v1/sql_query.cpp @@ -3399,6 +3399,12 @@ TNodePtr TSqlQuery::PragmaStatement(const TRule_pragma_stmt& stmt, bool& success } else if (normalizedPragma == "disablegroupbyexprafterwhere") { Ctx.GroupByExprAfterWhere = false; Ctx.IncrementMonCounter("sql_pragma", "DisableGroupByExprAfterWhere"); + } else if (normalizedPragma == "failongroupbyexproverride") { + Ctx.FailOnGroupByExprOverride = true; + Ctx.IncrementMonCounter("sql_pragma", "FailOnGroupByExprOverride"); + } else if (normalizedPragma == "disablefailongroupbyexproverride") { + Ctx.FailOnGroupByExprOverride = false; + Ctx.IncrementMonCounter("sql_pragma", "DisableFailOnGroupByExprOverride"); } else if (normalizedPragma == "engine") { Ctx.IncrementMonCounter("sql_pragma", "Engine"); diff --git a/yql/essentials/tests/s-expressions/minirun/part5/canondata/result.json b/yql/essentials/tests/s-expressions/minirun/part5/canondata/result.json index 98fcc4f04ff..0bf1144eecf 100644 --- a/yql/essentials/tests/s-expressions/minirun/part5/canondata/result.json +++ b/yql/essentials/tests/s-expressions/minirun/part5/canondata/result.json @@ -128,6 +128,20 @@ "uri": "https://{canondata_backend}/1942525/ebc309da64241c6f5f13249c90361edaa566a9cc/resource.tar.gz#test.test_EquiJoin-EquiConvertToCommonTypeAlias-default.txt-Results_/results.txt" } ], + "test.test[EquiJoin-FuseEquiJoins-default.txt-Debug]": [ + { + "checksum": "e4789e7f286c2d891f84c3f5a9016dbd", + "size": 981, + "uri": "https://{canondata_backend}/1942173/e0468c17e455c4e7740e0b19765633d5a5aca7af/resource.tar.gz#test.test_EquiJoin-FuseEquiJoins-default.txt-Debug_/opt.yql" + } + ], + "test.test[EquiJoin-FuseEquiJoins-default.txt-Results]": [ + { + "checksum": "d4c82ff9c9a0c83a3f0b79b0472c76af", + "size": 2466, + "uri": "https://{canondata_backend}/1942173/e0468c17e455c4e7740e0b19765633d5a5aca7af/resource.tar.gz#test.test_EquiJoin-FuseEquiJoins-default.txt-Results_/results.txt" + } + ], "test.test[EquiJoin-JoinInMemOpt1Opt2-default.txt-Debug]": [ { "checksum": "6fab425c7eb72691262bf6b82c6f60fb", diff --git a/yql/essentials/tests/s-expressions/suites/EquiJoin/FuseEquiJoins.yqls b/yql/essentials/tests/s-expressions/suites/EquiJoin/FuseEquiJoins.yqls new file mode 100644 index 00000000000..6333e6f3432 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/EquiJoin/FuseEquiJoins.yqls @@ -0,0 +1,33 @@ +( +(let flag (Configure! world (DataSource 'config) 'OptimizerFlags 'FuseEquiJoinsInputMultiLabels)) +(let mr_source (DataSource 'yt 'plato)) +(let t1 (AsList + (AsStruct '('key1 (Int32 '1)) '('value1 (String 'A))) + (AsStruct '('key1 (Int32 '2)) '('value1 (String 'B))) +)) + +(let t2 (AsList + (AsStruct '('key2 (Int32 '3)) '('value2 (String 'C))) + (AsStruct '('key2 (Int32 '4)) '('value2 (String 'D))) +)) + +(let t3 (AsList + (AsStruct '('key3 (Int32 '4)) '('value3 (String 'E))) + (AsStruct '('key3 (Int32 '5)) '('value3 (String 'F))) +)) + +(let t4 (AsList + (AsStruct '('key4 (Int32 '6)) '('value4 (String 'J))) + (AsStruct '('key4 (Int32 '7)) '('value4 (String 'H))) +)) + +(let ej1 (EquiJoin '(t1 'a) '((FlatMap t2 (lambda '(row) (OptionalIf (Coalesce (> (Member row 'key2) (Int32 '1)) (Bool 'false)) row))) 'b) '('Inner 'a 'b '('a 'key1) '('b 'key2) '()) '())) +(let ej2 (EquiJoin '(ej1 '('a 'b)) '(t3 'c) '('Inner 'a 'c '('a 'key1) '('c 'key3) '()) '())) +(let ej3 (EquiJoin '(ej2 '('a 'b 'c)) '(t4 'd) '('Inner 'c 'd '('c 'key3) '('d 'key4) '()) '())) + +(let res_sink (DataSink 'result)) +(let world (Write! flag res_sink (Key) ej3 '('('type)))) + +(let world (Commit! world res_sink)) +(return world) +) diff --git a/yql/essentials/tools/yql_facade_run/yql_facade_run.cpp b/yql/essentials/tools/yql_facade_run/yql_facade_run.cpp index 7a6a4f94abe..f60a37e04e4 100644 --- a/yql/essentials/tools/yql_facade_run/yql_facade_run.cpp +++ b/yql/essentials/tools/yql_facade_run/yql_facade_run.cpp @@ -650,13 +650,13 @@ int TFacadeRunner::DoMain(int argc, const char *argv[]) { Cerr << "udf-resolver path must be specified when use 'scan-udfs'"; return -1; } - udfResolver = NCommon::CreateOutProcUdfResolver(FuncRegistry_.Get(), FileStorage_, RunOptions_.UdfResolverPath, {}, {}, RunOptions_.UdfResolverFilterSyscalls, {}); udfIndex = new TUdfIndex(); if (EQPlayerMode::Replay != RunOptions_.QPlayerMode) { + THoldingFileStorage storage(FileStorage_); RunOptions_.PrintInfo(TStringBuilder() << TInstant::Now().ToStringLocalUpToSeconds() << " Udf scanning started for " << RunOptions_.UdfsPaths.size() << " udfs ..."); - LoadRichMetadataToUdfIndex(*udfResolver, RunOptions_.UdfsPaths, false, TUdfIndex::EOverrideMode::RaiseError, *udfIndex); + LoadRichMetadataToUdfIndex(*udfResolver, RunOptions_.UdfsPaths, false, TUdfIndex::EOverrideMode::RaiseError, *udfIndex, storage); RunOptions_.PrintInfo(TStringBuilder() << TInstant::Now().ToStringLocalUpToSeconds() << " UdfIndex done."); } diff --git a/yql/tools/yqlrun/yqlrun.cpp b/yql/tools/yqlrun/yqlrun.cpp index b3815321c8c..8e9fd09dc96 100644 --- a/yql/tools/yqlrun/yqlrun.cpp +++ b/yql/tools/yqlrun/yqlrun.cpp @@ -81,8 +81,9 @@ void CommonInit(const NLastGetopt::TOptsParseResult& res, const TString& udfReso udfResolver = NCommon::CreateOutProcUdfResolver(funcRegistry.Get(), fileStorage, udfResolverPath, {}, {}, filterSysCalls, {}); Cerr << TInstant::Now().ToStringLocalUpToSeconds() << " Udf scanning started for " << udfsPaths.size() << " udfs ..." << Endl; + THoldingFileStorage storage(fileStorage); udfIndex = new TUdfIndex(); - LoadRichMetadataToUdfIndex(*udfResolver, udfsPaths, false, TUdfIndex::EOverrideMode::RaiseError, *udfIndex); + LoadRichMetadataToUdfIndex(*udfResolver, udfsPaths, false, TUdfIndex::EOverrideMode::RaiseError, *udfIndex, storage); Cerr << TInstant::Now().ToStringLocalUpToSeconds() << " UdfIndex done." << Endl; udfResolver = NCommon::CreateUdfResolverWithIndex(udfIndex, udfResolver, fileStorage); diff --git a/yt/cpp/mapreduce/client/client.cpp b/yt/cpp/mapreduce/client/client.cpp index 18c7a3ad5d4..c4bb54d1a7d 100644 --- a/yt/cpp/mapreduce/client/client.cpp +++ b/yt/cpp/mapreduce/client/client.cpp @@ -1226,7 +1226,7 @@ void TClient::InsertRows( RequestWithRetry<void>( ClientRetryPolicy_->CreatePolicyForGenericRequest(), [this, &path, &rows, &options] (TMutationId /*mutationId*/) { - NRawClient::InsertRows(Context_, path, rows, options); + RawClient_->InsertRows(path, rows, options); }); } @@ -1239,7 +1239,7 @@ void TClient::DeleteRows( RequestWithRetry<void>( ClientRetryPolicy_->CreatePolicyForGenericRequest(), [this, &path, &keys, &options] (TMutationId /*mutationId*/) { - NRawClient::DeleteRows(Context_, path, keys, options); + RawClient_->DeleteRows(path, keys, options); }); } @@ -1266,7 +1266,7 @@ TNode::TListType TClient::LookupRows( return RequestWithRetry<TNode::TListType>( ClientRetryPolicy_->CreatePolicyForGenericRequest(), [this, &path, &keys, &options] (TMutationId /*mutationId*/) { - return NRawClient::LookupRows(Context_, path, keys, options); + return RawClient_->LookupRows(path, keys, options); }); } diff --git a/yt/cpp/mapreduce/http_client/raw_client.cpp b/yt/cpp/mapreduce/http_client/raw_client.cpp index ab8fbf5821c..cb5a852b176 100644 --- a/yt/cpp/mapreduce/http_client/raw_client.cpp +++ b/yt/cpp/mapreduce/http_client/raw_client.cpp @@ -677,7 +677,14 @@ void THttpRawClient::InsertRows( const TNode::TListType& rows, const TInsertRowsOptions& options) { - NRawClient::InsertRows(Context_, path, rows, options); + TMutationId mutationId; + THttpHeader header("PUT", "insert_rows"); + header.SetInputFormat(TFormat::YsonBinary()); + header.MergeParameters(NRawClient::SerializeParametersForInsertRows(Context_.Config->Prefix, path, options)); + auto body = NodeListToYsonString(rows); + TRequestConfig config; + config.IsHeavy = true; + RequestWithoutRetry(Context_, mutationId, header, body, config)->GetResponse(); } void THttpRawClient::TrimRows( @@ -701,7 +708,28 @@ TNode::TListType THttpRawClient::LookupRows( const TNode::TListType& keys, const TLookupRowsOptions& options) { - return NRawClient::LookupRows(Context_, path, keys, options); + TMutationId mutationId; + THttpHeader header("PUT", "lookup_rows"); + header.AddPath(AddPathPrefix(path, Context_.Config->ApiVersion)); + header.SetInputFormat(TFormat::YsonBinary()); + header.SetOutputFormat(TFormat::YsonBinary()); + + header.MergeParameters(BuildYsonNodeFluently().BeginMap() + .DoIf(options.Timeout_.Defined(), [&] (TFluentMap fluent) { + fluent.Item("timeout").Value(static_cast<i64>(options.Timeout_->MilliSeconds())); + }) + .Item("keep_missing_rows").Value(options.KeepMissingRows_) + .Item("versioned").Value(options.Versioned_) + .DoIf(options.Columns_.Defined(), [&] (TFluentMap fluent) { + fluent.Item("column_names").Value(*options.Columns_); + }) + .EndMap()); + + auto body = NodeListToYsonString(keys); + TRequestConfig config; + config.IsHeavy = true; + auto responseInfo = RequestWithoutRetry(Context_, mutationId, header, body, config); + return NodeFromYsonString(responseInfo->GetResponse(), ::NYson::EYsonType::ListFragment).AsList(); } TNode::TListType THttpRawClient::SelectRows( @@ -819,7 +847,15 @@ void THttpRawClient::DeleteRows( const TNode::TListType& keys, const TDeleteRowsOptions& options) { - NRawClient::DeleteRows(Context_, path, keys, options); + TMutationId mutationId; + THttpHeader header("PUT", "delete_rows"); + header.SetInputFormat(TFormat::YsonBinary()); + header.MergeParameters(NRawClient::SerializeParametersForDeleteRows(Context_.Config->Prefix, path, options)); + + auto body = NodeListToYsonString(keys); + TRequestConfig config; + config.IsHeavy = true; + RequestWithoutRetry(Context_, mutationId, header, body, config)->GetResponse(); } void THttpRawClient::FreezeTable( diff --git a/yt/cpp/mapreduce/http_client/raw_requests.cpp b/yt/cpp/mapreduce/http_client/raw_requests.cpp index 5d19ea1fb9a..c07c5ac1ddd 100644 --- a/yt/cpp/mapreduce/http_client/raw_requests.cpp +++ b/yt/cpp/mapreduce/http_client/raw_requests.cpp @@ -356,69 +356,6 @@ std::unique_ptr<IOutputStream> WriteTable( return std::make_unique<THttpRequestStream>(std::move(request), options.BufferSize_); } -void InsertRows( - const TClientContext& context, - const TYPath& path, - const TNode::TListType& rows, - const TInsertRowsOptions& options) -{ - TMutationId mutationId; - THttpHeader header("PUT", "insert_rows"); - header.SetInputFormat(TFormat::YsonBinary()); - header.MergeParameters(NRawClient::SerializeParametersForInsertRows(context.Config->Prefix, path, options)); - auto body = NodeListToYsonString(rows); - TRequestConfig config; - config.IsHeavy = true; - RequestWithoutRetry(context, mutationId, header, body, config)->GetResponse(); -} - -TNode::TListType LookupRows( - const TClientContext& context, - const TYPath& path, - const TNode::TListType& keys, - const TLookupRowsOptions& options) -{ - TMutationId mutationId; - THttpHeader header("PUT", "lookup_rows"); - header.AddPath(AddPathPrefix(path, context.Config->ApiVersion)); - header.SetInputFormat(TFormat::YsonBinary()); - header.SetOutputFormat(TFormat::YsonBinary()); - - header.MergeParameters(BuildYsonNodeFluently().BeginMap() - .DoIf(options.Timeout_.Defined(), [&] (TFluentMap fluent) { - fluent.Item("timeout").Value(static_cast<i64>(options.Timeout_->MilliSeconds())); - }) - .Item("keep_missing_rows").Value(options.KeepMissingRows_) - .Item("versioned").Value(options.Versioned_) - .DoIf(options.Columns_.Defined(), [&] (TFluentMap fluent) { - fluent.Item("column_names").Value(*options.Columns_); - }) - .EndMap()); - - auto body = NodeListToYsonString(keys); - TRequestConfig config; - config.IsHeavy = true; - auto responseInfo = RequestWithoutRetry(context, mutationId, header, body, config); - return NodeFromYsonString(responseInfo->GetResponse(), ::NYson::EYsonType::ListFragment).AsList(); -} - -void DeleteRows( - const TClientContext& context, - const TYPath& path, - const TNode::TListType& keys, - const TDeleteRowsOptions& options) -{ - TMutationId mutationId; - THttpHeader header("PUT", "delete_rows"); - header.SetInputFormat(TFormat::YsonBinary()); - header.MergeParameters(NRawClient::SerializeParametersForDeleteRows(context.Config->Prefix, path, options)); - - auto body = NodeListToYsonString(keys); - TRequestConfig config; - config.IsHeavy = true; - RequestWithoutRetry(context, mutationId, header, body, config)->GetResponse(); -} - TAuthorizationInfo WhoAmI(const TClientContext& context) { TMutationId mutationId; diff --git a/yt/cpp/mapreduce/http_client/raw_requests.h b/yt/cpp/mapreduce/http_client/raw_requests.h index 41208ad2c0d..63f39f62bba 100644 --- a/yt/cpp/mapreduce/http_client/raw_requests.h +++ b/yt/cpp/mapreduce/http_client/raw_requests.h @@ -55,24 +55,6 @@ std::unique_ptr<IOutputStream> WriteTable( const TMaybe<TFormat>& format, const TTableWriterOptions& options); -void InsertRows( - const TClientContext& context, - const TYPath& path, - const TNode::TListType& rows, - const TInsertRowsOptions& options); - -TNode::TListType LookupRows( - const TClientContext& context, - const TYPath& path, - const TNode::TListType& keys, - const TLookupRowsOptions& options); - -void DeleteRows( - const TClientContext& context, - const TYPath& path, - const TNode::TListType& keys, - const TDeleteRowsOptions& options); - TAuthorizationInfo WhoAmI(const TClientContext& context); //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yql/providers/yt/codec/codegen/ut/yt_codec_cg_ut.cpp b/yt/yql/providers/yt/codec/codegen/ut/yt_codec_cg_ut.cpp index 15d86fdce5b..0f1133fa73a 100644 --- a/yt/yql/providers/yt/codec/codegen/ut/yt_codec_cg_ut.cpp +++ b/yt/yql/providers/yt/codec/codegen/ut/yt_codec_cg_ut.cpp @@ -135,6 +135,7 @@ struct TReadSetup { TInputBuf Buf_; }; +#ifndef _win_ Y_UNIT_TEST_SUITE(TYtCodegenCodec) { Y_UNIT_TEST(TestWriteJust) { TWriteSetup setup("WriteJust"); @@ -953,6 +954,7 @@ Y_UNIT_TEST_SUITE(TYtCodegenCodec) { } #endif } +#endif } #endif diff --git a/yt/yql/providers/yt/codec/codegen/ya.make.inc b/yt/yql/providers/yt/codec/codegen/ya.make.inc index e418e84d22a..6e9520ec789 100644 --- a/yt/yql/providers/yt/codec/codegen/ya.make.inc +++ b/yt/yql/providers/yt/codec/codegen/ya.make.inc @@ -19,6 +19,10 @@ PEERDIR( ) IF (NOT MKQL_DISABLE_CODEGEN) +IF (OS_WINDOWS) + #TODO llvm18 + PEERDIR(library/cpp/resource) +ELSE() LLVM_BC( yt_codec_bc.cpp NAME @@ -73,6 +77,7 @@ IF (NOT MKQL_DISABLE_CODEGEN) GetWrittenBytes FillZero ) +ENDIF() ELSE() CFLAGS( -DMKQL_DISABLE_CODEGEN diff --git a/yt/yt/client/table_client/unversioned_row.h b/yt/yt/client/table_client/unversioned_row.h index fd2baf0a83c..64ae6a3e4f6 100644 --- a/yt/yt/client/table_client/unversioned_row.h +++ b/yt/yt/client/table_client/unversioned_row.h @@ -16,8 +16,6 @@ #include <yt/yt/core/concurrency/fls.h> -#include <yt/yt_proto/yt/core/misc/proto/guid.pb.h> - #include <library/cpp/yt/compact_containers/compact_vector.h> #include <library/cpp/yt/memory/chunked_memory_pool.h> diff --git a/yt/yt/core/rpc/client.cpp b/yt/yt/core/rpc/client.cpp index 95b73ed5a1e..5e95c54412c 100644 --- a/yt/yt/core/rpc/client.cpp +++ b/yt/yt/core/rpc/client.cpp @@ -748,8 +748,8 @@ TServiceDescriptor& TServiceDescriptor::SetAcceptsBaggage(bool value) //////////////////////////////////////////////////////////////////////////////// -TMethodDescriptor::TMethodDescriptor(const TString& methodName) - : MethodName(methodName) +TMethodDescriptor::TMethodDescriptor(std::string methodName) + : MethodName(std::move(methodName)) { } TMethodDescriptor& TMethodDescriptor::SetMultiplexingBand(EMultiplexingBand value) diff --git a/yt/yt/core/rpc/client.h b/yt/yt/core/rpc/client.h index 9e7ddc728a1..1ed66105905 100644 --- a/yt/yt/core/rpc/client.h +++ b/yt/yt/core/rpc/client.h @@ -444,11 +444,11 @@ struct TServiceDescriptor struct TMethodDescriptor { - TString MethodName; + std::string MethodName; EMultiplexingBand MultiplexingBand = EMultiplexingBand::Default; bool StreamingEnabled = false; - explicit TMethodDescriptor(const TString& methodName); + explicit TMethodDescriptor(std::string methodName); TMethodDescriptor& SetMultiplexingBand(EMultiplexingBand value); TMethodDescriptor& SetStreamingEnabled(bool value); diff --git a/yt/yt/core/ytree/yson_struct.cpp b/yt/yt/core/ytree/yson_struct.cpp index 41e6c3de2f3..e019fc22fac 100644 --- a/yt/yt/core/ytree/yson_struct.cpp +++ b/yt/yt/core/ytree/yson_struct.cpp @@ -91,7 +91,7 @@ void TYsonStructBase::Save(IYsonConsumer* consumer) const consumer->OnEndMap(); } -void TYsonStructBase::SaveAsMapFragment(NYson::IYsonConsumer* consumer) const +void TYsonStructBase::SaveRecognizedAsMapFragment(NYson::IYsonConsumer* consumer) const { for (const auto& [name, parameter] : Meta_->GetParameterSortedList()) { if (!parameter->CanOmitValue(this)) { @@ -99,14 +99,51 @@ void TYsonStructBase::SaveAsMapFragment(NYson::IYsonConsumer* consumer) const parameter->Save(this, consumer); } } +} + +void TYsonStructBase::SaveAsMapFragment(NYson::IYsonConsumer* consumer) const +{ + if (!LocalUnrecognized_) { + // Fast path. + return SaveRecognizedAsMapFragment(consumer); + } + + const auto& recognizedList = Meta_->GetParameterSortedList(); + auto recognizedIt = recognizedList.begin(); + + auto unrecognizedList = LocalUnrecognized_->GetChildren(); + SortBy(unrecognizedList, [] (const auto& item) { return item.first; }); + auto unrecognizedIt = unrecognizedList.begin(); - if (LocalUnrecognized_) { - auto unrecognizedList = LocalUnrecognized_->GetChildren(); - SortBy(unrecognizedList, [] (const auto& item) { return item.first; }); - for (const auto& [key, child] : unrecognizedList) { - consumer->OnKeyedItem(key); - Serialize(child, consumer); + auto saveRecognized = [&recognizedIt, this] (auto* consumer) { + const auto& parameter = recognizedIt->second; + if (!parameter->CanOmitValue(this)) { + consumer->OnKeyedItem(recognizedIt->first); + parameter->Save(this, consumer); } + ++recognizedIt; + }; + + auto saveUnrecognized = [&unrecognizedIt] (auto* consumer) { + consumer->OnKeyedItem(unrecognizedIt->first); + Serialize(unrecognizedIt->second, consumer); + ++unrecognizedIt; + }; + + while (recognizedIt != recognizedList.end() && unrecognizedIt != unrecognizedList.end()) { + if (recognizedIt->first < unrecognizedIt->first) { + saveRecognized(consumer); + } else { + saveUnrecognized(consumer); + } + } + + while (recognizedIt != recognizedList.end()) { + saveRecognized(consumer); + } + + while (unrecognizedIt != unrecognizedList.end()) { + saveUnrecognized(consumer); } } diff --git a/yt/yt/core/ytree/yson_struct.h b/yt/yt/core/ytree/yson_struct.h index 62837542e69..cd93566f865 100644 --- a/yt/yt/core/ytree/yson_struct.h +++ b/yt/yt/core/ytree/yson_struct.h @@ -90,6 +90,9 @@ public: // of the |Load| call. void SaveAsMapFragment(NYson::IYsonConsumer* consumer) const; + // Same as the above, but does not save local unrecognized parameters. + void SaveRecognizedAsMapFragment(NYson::IYsonConsumer* consumer) const; + void Save(IOutputStream* output) const; IMapNodePtr GetLocalUnrecognized() const; diff --git a/yt/yt_proto/yt/core/rpc/proto/rpc.proto b/yt/yt_proto/yt/core/rpc/proto/rpc.proto index 27ec7fe913f..ba4542f6aea 100644 --- a/yt/yt_proto/yt/core/rpc/proto/rpc.proto +++ b/yt/yt_proto/yt/core/rpc/proto/rpc.proto @@ -86,6 +86,7 @@ message TRequestHeader * allow_resolve_from_sequoia_object 118 * resolve_depth 119 * ssl_credentials_ext 120 + * caused_by_node_expiration 124 * req_execute_ext 200 * req_multiread_ext 201 */ |