aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbazeltsev <bazeltsev@yandex-team.ru>2022-02-11 15:25:30 +0300
committerbazeltsev <bazeltsev@yandex-team.ru>2022-02-11 15:25:30 +0300
commit58865f92201c1f91524c35ffdeb9689e363a10b0 (patch)
tree413cdd44947ee205d4e2f0ea25b4578b9327edb6
parentc2de13b9ab7ce95116d50f549996f146c91017df (diff)
downloadydb-58865f92201c1f91524c35ffdeb9689e363a10b0.tar.gz
Updated core/en 20220211
updated ref:92d97494ab0810cd5a4c4157feb2be3353a8fbcc
-rw-r--r--ydb/docs/.yfmlint2
-rw-r--r--ydb/docs/en/core/best_practices/_includes/batch_upload.md17
-rw-r--r--ydb/docs/en/core/best_practices/_includes/paging.md3
-rw-r--r--ydb/docs/en/core/best_practices/_includes/schema_design.md1
-rw-r--r--ydb/docs/en/core/best_practices/_includes/secondary_indexes.md3
-rw-r--r--ydb/docs/en/core/best_practices/_includes/table_sharding.md3
-rw-r--r--ydb/docs/en/core/best_practices/_includes/timeouts.md19
-rw-r--r--ydb/docs/en/core/best_practices/index.md1
-rw-r--r--ydb/docs/en/core/concepts/_includes/databases/base_hierarchy.md8
-rw-r--r--ydb/docs/en/core/concepts/_includes/databases/cluster.md3
-rw-r--r--ydb/docs/en/core/concepts/_includes/databases/compute.md3
-rw-r--r--ydb/docs/en/core/concepts/_includes/databases/database.md1
-rw-r--r--ydb/docs/en/core/concepts/_includes/databases/intro.md6
-rw-r--r--ydb/docs/en/core/concepts/_includes/databases/regions.md1
-rw-r--r--ydb/docs/en/core/concepts/_includes/databases/slots.md1
-rw-r--r--ydb/docs/en/core/concepts/_includes/databases/storage_groups.md1
-rw-r--r--ydb/docs/en/core/concepts/_includes/datamodel/blockdevice.md1
-rw-r--r--ydb/docs/en/core/concepts/_includes/datamodel/folder.md1
-rw-r--r--ydb/docs/en/core/concepts/_includes/datamodel/pq.md1
-rw-r--r--ydb/docs/en/core/concepts/_includes/datamodel/table.md2
-rw-r--r--ydb/docs/en/core/concepts/_includes/index/intro.md6
-rw-r--r--ydb/docs/en/core/concepts/_includes/index/when_use.md3
-rw-r--r--ydb/docs/en/core/concepts/_includes/limits-ydb.md1
-rw-r--r--ydb/docs/en/core/concepts/_includes/scan_query.md5
-rw-r--r--ydb/docs/en/core/concepts/_includes/secondary_indexes.md2
-rw-r--r--ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/01_intro.md8
-rw-r--r--ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/02_sls_pars.md1
-rw-r--r--ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/10_arch_diff.md3
-rw-r--r--ydb/docs/en/core/concepts/_includes/transactions.md3
-rw-r--r--ydb/docs/en/core/concepts/_includes/ttl.md5
-rw-r--r--ydb/docs/en/core/concepts/datatypes.md1
-rw-r--r--ydb/docs/en/core/concepts/toc_i.yaml18
-rw-r--r--ydb/docs/en/core/deploy/orchestrated/aws_eks.md2
-rw-r--r--ydb/docs/en/core/faq/_includes/common.md5
-rw-r--r--ydb/docs/en/core/getting_started/_includes/useful_links.md3
-rw-r--r--ydb/docs/en/core/getting_started/_includes/ydb_docker/01_intro.md1
-rw-r--r--ydb/docs/en/core/getting_started/_includes/ydb_docker/02_install.md3
-rw-r--r--ydb/docs/en/core/getting_started/_includes/ydb_docker/03_start.md1
-rw-r--r--ydb/docs/en/core/getting_started/_includes/ydb_docker/04_request.md3
-rw-r--r--ydb/docs/en/core/getting_started/_includes/ydb_docker/06_license.md1
-rw-r--r--ydb/docs/en/core/getting_started/index.md3
-rw-r--r--ydb/docs/en/core/getting_started/useful_links.md4
-rw-r--r--ydb/docs/en/core/maintenance/_includes/backup_and_recovery/01_intro.md11
-rw-r--r--ydb/docs/en/core/maintenance/_includes/backup_and_recovery/03_limitations.md3
-rw-r--r--ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_1_header.md1
-rw-r--r--ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_2_body.md1
-rw-r--r--ydb/docs/en/core/maintenance/_includes/backup_and_recovery/05_fs_restore.md1
-rw-r--r--ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_3_access_keys.md3
-rw-r--r--ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_4_export.md2
-rw-r--r--ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_5_restore.md3
-rw-r--r--ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_6_forget.md3
-rw-r--r--ydb/docs/en/core/maintenance/embedded_monitoring/charts.md1
-rw-r--r--ydb/docs/en/core/maintenance/embedded_monitoring/interconnect_overview.md1
-rw-r--r--ydb/docs/en/core/maintenance/embedded_monitoring/logs.md1
-rw-r--r--ydb/docs/en/core/maintenance/embedded_monitoring/ydb_monitoring.md13
-rw-r--r--ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/copy.md2
-rw-r--r--ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/rename.md2
-rw-r--r--ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/restore.md17
-rw-r--r--ydb/docs/en/core/reference/ydb-cli/index.md5
-rw-r--r--ydb/docs/en/core/reference/ydb-cli/toc_i.yaml2
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/_includes/index/examples.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/_includes/index/intro.md2
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/addition.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/pragmatablepathprefix.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-cpp.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-dotnet.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-java.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-nodejs.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-php.md2
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-python.md30
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/index.md2
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/01_init.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/02_create_table.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/03_query_processing.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/04_results_processing.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/05_write_queries.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/06_param_queries.md3
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/07_param_prep_queries.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/08_scan_query.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/09_multistep_transactions.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/10_transaction_control.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/50_error_handling.md1
-rw-r--r--ydb/docs/en/core/reference/ydb-sdk/example/toc_i.yaml2
-rw-r--r--ydb/docs/en/core/toc_p.yaml26
-rw-r--r--ydb/docs/en/core/troubleshooting/_includes/monitoring_sensors.md1
-rw-r--r--ydb/docs/en/core/troubleshooting/_includes/system_views/partitions.md1
-rw-r--r--ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_example_yql.md7
-rw-r--r--ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_header.md1
-rw-r--r--ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics.md3
-rw-r--r--ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_example_yql.md5
-rw-r--r--ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_header.md1
-rw-r--r--ydb/docs/en/core/troubleshooting/_includes/system_views/tops.md1
-rw-r--r--ydb/docs/en/core/troubleshooting/_includes/system_views/tops_example_yql.md5
-rw-r--r--ydb/docs/en/core/troubleshooting/_includes/system_views/tops_header.md1
-rw-r--r--ydb/docs/en/core/troubleshooting/monitoring.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/_includes/cast_examples.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/agg_list.md6
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/histogram.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/max_min_by.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/percentile_median.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/session_start.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/top_bottom.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/abs.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/aggr_factory.md23
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_container.md6
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_tagged.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/bitops.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/byteat.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/callable.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/coalesce.md6
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/container_literal.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_tz.md13
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_utc.md11
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/data-type-literals.md8
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/ensure.md8
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/enum.md9
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/evaluate_expr_atom.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/files.md16
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/find.md21
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/if.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/intro.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/length.md7
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/max_min.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/metadata.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/nanvl.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/optional_ops.md12
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/pickle.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/random.md10
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/starts_ends_with.md13
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticmap.md9
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/substring.md12
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_path_name_recindex.md18
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_row.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/to_from_bytes.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/variant.md6
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/weakfield.md6
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/codegen.md30
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/dict.md81
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/json.md2275
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/list.md169
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/struct.md56
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/types.md155
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/aggregate.md8
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/first_last_value.md6
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/intro.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/lag_lead.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/rank_dense.md10
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/row_number.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/session_state.md1
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/begin.md5
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/define_do.md7
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/evaluate.md21
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/alter_table.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/create_table.md6
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/declare/general.md9
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/export_import.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/as.md16
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/between.md5
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/bitcast.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/case.md9
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/cast.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/check-match.md12
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/concatenation.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/in.md16
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-distinct-from.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-null.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/items-access.md7
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/lambda.md5
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/named-nodes.md32
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/operators.md22
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/tables.md17
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_by.md23
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_columns.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_other_db.md11
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_type_by.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/compact.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/distinct.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general.md20
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general_stream.md12
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having_stream.md6
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/rollup_cube_sets.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/session_window.md16
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/join.md8
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/debug.md24
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/definition.md9
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/files.md8
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/global.md22
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/ydb.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/yson.md1
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/process.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/assume_order_by.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/calc.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/column_order.md8
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/commit.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/distinct.md5
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/execution.md17
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/folder.md9
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from.md7
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_as_table.md5
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_select.md7
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/functional_tables.md23
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/limit_offset.md11
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/order_by.md7
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/sample.md11
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/secondary_index.md7
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/temporary_table.md7
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all.md6
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all_rules.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/view.md7
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/where.md3
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/with.md15
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/without.md5
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/subquery.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/use.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/expressions.md1
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/index.md1
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/select.md1
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/toc_i.yaml58
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/cast.md10
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/containers.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_number.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_string.md4
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/json.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/optional.md12
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/primitive.md12
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/histogram.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/string.md12
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/unicode.md34
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/url.md22
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/datetime.md27
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/digest.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/hyperscan.md5
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/ip.md2
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/math.md17
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/pire.md6
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/re2.md5
-rw-r--r--ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/yson.md9
-rw-r--r--ydb/docs/en/core/yql/tutorial/_includes/index/intro.md9
-rw-r--r--ydb/docs/en/core/yql/tutorial/_includes/index/steps.md3
-rw-r--r--ydb/docs/en/core/yql/tutorial/_includes/yql_tutorial_prerequisites.md1
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/alter_table.md3
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/basic_aggregation.md9
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/basic_filter_and_sort.md9
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/conditional_values.md5
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/create_demo_tables.md3
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/delete.md1
-rw-r--r--ydb/docs/en/core/yql/tutorial/delete_table.md3
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/fill_tables_with_data.md3
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/insert_into.md3
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/join_tables.md1
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/replace_into.md3
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/select_all_columns.md3
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/select_specific_columns.md0
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/update.md3
-rw-r--r--[-rwxr-xr-x]ydb/docs/en/core/yql/tutorial/upsert_into.md3
-rw-r--r--ydb/docs/presets.yaml5
257 files changed, 1952 insertions, 2376 deletions
diff --git a/ydb/docs/.yfmlint b/ydb/docs/.yfmlint
new file mode 100644
index 0000000000..ed1cde173c
--- /dev/null
+++ b/ydb/docs/.yfmlint
@@ -0,0 +1,2 @@
+log-levels:
+ YFM001: 'disabled'
diff --git a/ydb/docs/en/core/best_practices/_includes/batch_upload.md b/ydb/docs/en/core/best_practices/_includes/batch_upload.md
index 6c2558b738..2791ab4d1c 100644
--- a/ydb/docs/en/core/best_practices/_includes/batch_upload.md
+++ b/ydb/docs/en/core/best_practices/_includes/batch_upload.md
@@ -12,17 +12,17 @@ There are anti-patterns and non-optimal settings for uploading data. They don't
To accelerate data uploads, consider the following recommendations:
* Shard a table when creating it. This lets you effectively use the system bandwidth as soon as you start uploading data.
-By default, a new table consists of a single shard. {{ ydb-short-name }} supports automatic table sharding by data volume. This means that a table shard is divided into two shards when it reaches a certain size.
-The acceptable size for splitting a table shard is 2 GB. As the number of shards grows, the data upload bandwidth increases, but it remains low for some time at first.
-Therefore, when uploading a large amount of data for the first time, we recommend initially creating a table with the desired number of shards. You can calculate the number of shards based on 1 GB of data per shard in a resulting set.
+ By default, a new table consists of a single shard. {{ ydb-short-name }} supports automatic table sharding by data volume. This means that a table shard is divided into two shards when it reaches a certain size.
+ The acceptable size for splitting a table shard is 2 GB. As the number of shards grows, the data upload bandwidth increases, but it remains low for some time at first.
+ Therefore, when uploading a large amount of data for the first time, we recommend initially creating a table with the desired number of shards. You can calculate the number of shards based on 1 GB of data per shard in a resulting set.
* Insert multiple rows in each transaction to reduce the overhead of the transactions themselves.
-Each transaction in {{ ydb-short-name }} has some overhead. To reduce the total overhead, you should make transactions that insert multiple rows. Good performance indicators terminate a transaction when it reaches 1 MB of data or 100,000 rows.
-When uploading data, avoid transactions that insert a single row.
+ Each transaction in {{ ydb-short-name }} has some overhead. To reduce the total overhead, you should make transactions that insert multiple rows. Good performance indicators terminate a transaction when it reaches 1 MB of data or 100,000 rows.
+ When uploading data, avoid transactions that insert a single row.
* Within each transaction, insert rows from the primary key-sorted set to minimize the number of shards that the transaction affects.
-In {{ ydb-short-name }}, transactions that span multiple shards have higher overhead compared to transactions that involve exactly one shard. Moreover, this overhead increases with the growing number of table shards involved in the transaction.
-We recommend selecting rows to be inserted in a particular transaction so that they're located in a small number of shards, ideally, in one.
+ In {{ ydb-short-name }}, transactions that span multiple shards have higher overhead compared to transactions that involve exactly one shard. Moreover, this overhead increases with the growing number of table shards involved in the transaction.
+ We recommend selecting rows to be inserted in a particular transaction so that they're located in a small number of shards, ideally, in one.
* You should avoid writing data sequentially in ascending or descending order of the primary key.
-Writing data to a table with a monotonically increasing key causes all new data to be written to the end of the table, since all tables in YDB are sorted by ascending primary key. As YDB splits table data into shards based on key ranges, inserts are always processed by the same server that is responsible for the "last" shard. Concentrating the load on a single server results in slow data uploading and inefficient use of a distributed system.
+ Writing data to a table with a monotonically increasing key causes all new data to be written to the end of the table, since all tables in YDB are sorted by ascending primary key. As YDB splits table data into shards based on key ranges, inserts are always processed by the same server that is responsible for the "last" shard. Concentrating the load on a single server results in slow data uploading and inefficient use of a distributed system.
{% note warning %}
@@ -37,4 +37,3 @@ We recommend the following algorithm for efficiently uploading data to {{ ydb-sh
3. Partition the resulting data set by the number of shards in the table. Each part will contain a set of consecutive rows.
4. Upload the resulting parts to the table shards concurrently.
5. Make a ```COMMIT``` after every 100,000 rows or 1 MB of data.
-
diff --git a/ydb/docs/en/core/best_practices/_includes/paging.md b/ydb/docs/en/core/best_practices/_includes/paging.md
index 2461f9c894..661f281555 100644
--- a/ydb/docs/en/core/best_practices/_includes/paging.md
+++ b/ydb/docs/en/core/best_practices/_includes/paging.md
@@ -50,7 +50,7 @@ SELECT * FROM $union
ORDER BY city, number LIMIT $limit;
```
-{% note warning "Значение NULL в ключевой колонке" %}
+{% note warning "NULL value in key column" %}
In YDB, all columns, including key ones, may have a NULL value. Despite this, using NULL as key column values is highly discouraged, since the SQL standard doesn't allow NULL to be compared. As a result, concise SQL statements with simple comparison operators won't work correctly. Instead, you'll have to use cumbersome statements with IS NULL/IS NOT NULL expressions.
@@ -59,7 +59,6 @@ In YDB, all columns, including key ones, may have a NULL value. Despite this, us
## Examples of paginated output implementation
{% if oss %}
-
* [C++](https://a.yandex-team.ru/arc/trunk/arcadia/kikimr/public/sdk/cpp/examples/pagination)
{% endif %}
* [Java](https://github.com/yandex-cloud/ydb-java-sdk/tree/master/examples/src/main/java/com/yandex/ydb/examples/pagination)
diff --git a/ydb/docs/en/core/best_practices/_includes/schema_design.md b/ydb/docs/en/core/best_practices/_includes/schema_design.md
index 70e9496c43..d0c3aae9a2 100644
--- a/ydb/docs/en/core/best_practices/_includes/schema_design.md
+++ b/ydb/docs/en/core/best_practices/_includes/schema_design.md
@@ -47,4 +47,3 @@ In {{ ydb-short-name }}, all columns, including key ones, may contain a NULL val
## Row size limit {#limit-string}
To achieve high performance, we don't recommend writing rows larger than 8 MB and key columns larger than 2 KB to the DB.
-
diff --git a/ydb/docs/en/core/best_practices/_includes/secondary_indexes.md b/ydb/docs/en/core/best_practices/_includes/secondary_indexes.md
index 4409365e15..cb928162b2 100644
--- a/ydb/docs/en/core/best_practices/_includes/secondary_indexes.md
+++ b/ydb/docs/en/core/best_practices/_includes/secondary_indexes.md
@@ -5,7 +5,7 @@ This section describes how to use [secondary indexes](../../concepts/secondary_i
In general, transactions using a global index are [distributed transactions](../../concepts/transactions.md#distributed-tx). A query can be executed as a single-shard transaction in the following cases:
* Point read by primary key.
-* Point read by index column if requested data is a primary key, part of it, or there is a copy of the data in a [covering index](../../concepts/secondary_indexes.md#covering)).
+* Point read by index column if requested data is a primary key, part of it, or there is a copy of the data in a [covering index](../../concepts/secondary_indexes.md#covering).
* Point blind write in a table with an [asynchronous index](../../concepts/secondary_indexes.md#async).
{% note warning %}
@@ -127,4 +127,3 @@ SELECT series_id,
FROM series view views_index
WHERE views == 0;
```
-
diff --git a/ydb/docs/en/core/best_practices/_includes/table_sharding.md b/ydb/docs/en/core/best_practices/_includes/table_sharding.md
index 235123a641..0d48336513 100644
--- a/ydb/docs/en/core/best_practices/_includes/table_sharding.md
+++ b/ydb/docs/en/core/best_practices/_includes/table_sharding.md
@@ -5,12 +5,10 @@ YDB tables are sorted by primary key in ascending order. Tables are partitioned
Thanks to partitioning, table data can be distributed across multiple storage devices and the load from operations on a table can use more processor cores and network bandwidth. However, too many partitions in a table may add overhead on RAM and CPU time usage. So optimal partitioning directly affects the efficiency of query execution. To achieve optimal partitioning, YDB provides tools for the initial partitioning of a table when creating it as well as methods for subsequent automatic partitioning.
When creating a table, you can set the initial partitioning in one of two ways:
-
* Set up even partitioning by the first column of the primary key if this column is UInt32 or UInt64. In this case, you need to explicitly specify the number of partitions.
* Set the exact partitioning keys that determine the number and boundaries of the original partitions.
YDB supports two methods for automatic table partitioning:
-
* By data size.
* By load on a datashard (a system component that serves a table partition).
@@ -19,4 +17,3 @@ Automatic partitioning modes can be enabled separately or together. Both modes c
Automatic partitioning by size is parameterized by the value of the partition size setting. When that value is reach, the partition is split. The default value is 2 GB. A key for splitting is selected based on the histogram of data size distribution across partitions by key sub-ranges. If the total data size in adjacent partitions becomes less than half of the setting size, these partitions are merged.
Automatic partitioning by load is triggered based on CPU usage by the datashard serving the partition. All datashards monitor their CPU usage. If a high (>50%) level of usage is detected at some point in time, the partition is split. A key is selected using statistics on accessing the keys of a datashard's own partition.
-
diff --git a/ydb/docs/en/core/best_practices/_includes/timeouts.md b/ydb/docs/en/core/best_practices/_includes/timeouts.md
index 9b6f178c39..54c583612f 100644
--- a/ydb/docs/en/core/best_practices/_includes/timeouts.md
+++ b/ydb/docs/en/core/best_practices/_includes/timeouts.md
@@ -1,6 +1,6 @@
---
-title: Использование таймаутов в Yandex Database (YDB)
-description: 'Значение operation_timeout определяет время, в течение которого результат запроса интересен пользователю. Если за данное время операция не выполнилась, сервер возвращает ошибку c кодом Timeout и попытается прекратить выполнение запроса, однако отмена запроса не гарантируется. Всегда рекомендуется устанавливать и таймаут на операцию, и транспортный таймаут. '
+title: Using timeouts in Yandex Database (YDB)
+description: 'The operation_timeout value determines the time during which the query result is interesting to the user. If the operation has not been performed during this time, the server returns an error with the Timeout code and tries to terminate the execution of the request, but the cancellation of the request is not guaranteed. It is always recommended to set both the operation timeout and the transport timeout.'
---
This section describes available timeouts and provides examples of their usage in various programming languages.
@@ -28,7 +28,7 @@ Timeout usage example:
```python
from kikimr.public.sdk.python import client as ydb
-
+
def execute_in_tx(session, query):
settings = ydb.BaseRequestSettings()
settings = settings.with_timeout(0.5) # transport timeout
@@ -46,13 +46,13 @@ Timeout usage example:
- C++
```cpp
- #include <ydb/public/sdk/cpp/client/ydb_types/ydb.h>
- #include <ydb/public/sdk/cpp/client/ydb_table/table.h>
- #include <ydb/public/sdk/cpp/client/ydb_value/value.h>
-
+ #include <kikimr/public/sdk/cpp/client/ydb.h>
+ #include <kikimr/public/sdk/cpp/client/ydb_table.h>
+ #include <kikimr/public/sdk/cpp/client/ydb_value.h>
+
using namespace NYdb;
using namespace NYdb::NTable;
-
+
TAsyncStatus ExecuteInTx(TSession& session, TString query, TParams params) {
return session.ExecuteDataQuery(
query
@@ -74,7 +74,7 @@ Timeout usage example:
"a.yandex-team.ru/kikimr/public/sdk/go/ydb"
"a.yandex-team.ru/kikimr/public/sdk/go/ydb/table"
)
-
+
func executeInTx(ctx context.Context, s *table.Session, query string) {
newCtx, close := context.WithTimeout(ctx, time.Millisecond*300) // client and by default operation timeout
newCtx2 := ydb.WithOperationTimeout(newCtx, time.Millisecond*400) // operation timeout override
@@ -86,4 +86,3 @@ Timeout usage example:
```
{% endlist %}
-
diff --git a/ydb/docs/en/core/best_practices/index.md b/ydb/docs/en/core/best_practices/index.md
index 91ae3a01bb..a4077dc318 100644
--- a/ydb/docs/en/core/best_practices/index.md
+++ b/ydb/docs/en/core/best_practices/index.md
@@ -1,2 +1 @@
This section provides recommendations on how to use {{ ydb-short-name }} features.
-
diff --git a/ydb/docs/en/core/concepts/_includes/databases/base_hierarchy.md b/ydb/docs/en/core/concepts/_includes/databases/base_hierarchy.md
index 97ef4ef07e..7b4c7f8645 100644
--- a/ydb/docs/en/core/concepts/_includes/databases/base_hierarchy.md
+++ b/ydb/docs/en/core/concepts/_includes/databases/base_hierarchy.md
@@ -2,10 +2,10 @@
To host databases in {{ ydb-short-name }}, use the following directory structure: ```/domain/account/directory/database```, where:
-- *A domain* is the first-level element where all cluster resources are located. There can only be one domain per cluster.
-- *An account* is a second-level element that defines the owner of a DB group.
-- *A directory* is a third-level element set by the account owner for grouping their databases.
-- *A database* is a fourth-level element that corresponds to the DB.
+* *A domain* is the first-level element where all cluster resources are located. There can only be one domain per cluster.
+* *An account* is a second-level element that defines the owner of a DB group.
+* *A directory* is a third-level element set by the account owner for grouping their databases.
+* *A database* is a fourth-level element that corresponds to the DB.
At the top hierarchy level, the cluster contains a single domain that hosts one or more accounts, while accounts host one or more directories that host databases.
diff --git a/ydb/docs/en/core/concepts/_includes/databases/cluster.md b/ydb/docs/en/core/concepts/_includes/databases/cluster.md
index fdb7ac42fd..fc4fc5a78b 100644
--- a/ydb/docs/en/core/concepts/_includes/databases/cluster.md
+++ b/ydb/docs/en/core/concepts/_includes/databases/cluster.md
@@ -1,6 +1,5 @@
## Cluster {#cluster}
-_A {{ ydb-short-name }}_ cluster is a set of {{ ydb-short-name }} nodes that the load is distributed across and that communicate with each other through a network. A single cluster may host multiple databases, and specific cluster nodes are allocated for each database. One database is fully hosted in one cluster.
+_A {{ ydb-short-name }} cluster_ is a set of {{ ydb-short-name }} nodes that the load is distributed across and that communicate with each other through a network. A single cluster may host multiple databases, and specific cluster nodes are allocated for each database. One database is fully hosted in one cluster.
There are {{ ydb-short-name }} clusters with a single data center and geo-distributed clusters. The smallest single-datacenter cluster consists of a single node.
-
diff --git a/ydb/docs/en/core/concepts/_includes/databases/compute.md b/ydb/docs/en/core/concepts/_includes/databases/compute.md
index cf4dc20369..7284642097 100644
--- a/ydb/docs/en/core/concepts/_includes/databases/compute.md
+++ b/ydb/docs/en/core/concepts/_includes/databases/compute.md
@@ -1,4 +1,3 @@
## Computing resources {#compute-resources}
-{{ ydb-short-name }} clusters can be deployed on bare metal, VMs, or in a container virtualization environment.
-
+{{ ydb-short-name }} clusters can be deployed on bare metal, VMs, or in a container virtualization environment. \ No newline at end of file
diff --git a/ydb/docs/en/core/concepts/_includes/databases/database.md b/ydb/docs/en/core/concepts/_includes/databases/database.md
index 70ec778ecb..12aef03453 100644
--- a/ydb/docs/en/core/concepts/_includes/databases/database.md
+++ b/ydb/docs/en/core/concepts/_includes/databases/database.md
@@ -13,4 +13,3 @@ _A {{ ydb-short-name }} database ({{ ydb-short-name }} DB)_ is an isolated consi
* Generates metrics that can be used to monitor the DB performance.
Resources for the {{ ydb-short-name }} database (CPU, RAM, nodes, and disk space) are allocated within a {{ ydb-short-name }} cluster.
-
diff --git a/ydb/docs/en/core/concepts/_includes/databases/intro.md b/ydb/docs/en/core/concepts/_includes/databases/intro.md
index 1b5da92712..ddf87b8818 100644
--- a/ydb/docs/en/core/concepts/_includes/databases/intro.md
+++ b/ydb/docs/en/core/concepts/_includes/databases/intro.md
@@ -1,6 +1,6 @@
---
-title: "Термины и определения {{ ydb-full-name }}"
-description: "База данных (БД) {{ ydb-full-name }} — это изолированное согласованное множество данных, доступ к которому осуществляется через сервис {{ ydb-full-name }}, обеспечивающий масштабируемость, отказоустойчивость, и автоматическую репликацию данных."
+title: "Terms and definitions {{ ydb-full-name }}"
+description: "A database (DB) {{ ydb-full-name }}: is an isolated, consistent set of data that is accessed through the {{ ydb-full-name }}, service, which provides scalability, fault tolerance, and automatic data replication."
---
-# Terms and definitions
+# Terms and definitions
diff --git a/ydb/docs/en/core/concepts/_includes/databases/regions.md b/ydb/docs/en/core/concepts/_includes/databases/regions.md
index a21125b9df..1c84c96c6a 100644
--- a/ydb/docs/en/core/concepts/_includes/databases/regions.md
+++ b/ydb/docs/en/core/concepts/_includes/databases/regions.md
@@ -6,4 +6,3 @@ _A wide geographic region_ is a territory where the distance between availabilit
A geo-distributed {{ ydb-short-name }} cluster contains nodes located in different availability zones within a wide geographic region. {{ ydb-short-name }} performs synchronous data writes to each of the availability zones, ensuring uninterrupted performance if an availability zone fails.
In geographically distributed clusters, you can choose a policy for distributing computing resources across data centers. This lets you find the right balance between minimum execution time and minimum downtime if a data center goes offline.
-
diff --git a/ydb/docs/en/core/concepts/_includes/databases/slots.md b/ydb/docs/en/core/concepts/_includes/databases/slots.md
index 1139d05acc..6469a59c63 100644
--- a/ydb/docs/en/core/concepts/_includes/databases/slots.md
+++ b/ydb/docs/en/core/concepts/_includes/databases/slots.md
@@ -3,4 +3,3 @@
_A slot_ is a part of the server resources allocated for running a single {{ ydb-short-name }} cluster node, it has a fixed size of 10CPU/50GB RAM. Slots are used if a {{ ydb-short-name }} cluster is deployed on bare-metal instances whose resources are sufficient to host multiple slots. If you use VMs for cluster deployment, their capacity is selected so that the use of slots is not required: one node serves one database and one database can use multiple nodes allocated to it.
You can see a list of DB slots in the output of the `discovery list` command of the {{ ydb-short-name }} console client.
-
diff --git a/ydb/docs/en/core/concepts/_includes/databases/storage_groups.md b/ydb/docs/en/core/concepts/_includes/databases/storage_groups.md
index b460eb8da9..62f4e22d42 100644
--- a/ydb/docs/en/core/concepts/_includes/databases/storage_groups.md
+++ b/ydb/docs/en/core/concepts/_includes/databases/storage_groups.md
@@ -5,4 +5,3 @@ A storage group is a redundant array of independent disks that are networked in
Each storage group corresponds to a specific storage schema that affects the number of disks used, the failure model, and the redundancy factor. The ``block4-2`` schema is commonly used for single data center clusters, where the storage group is located on 8 disks in 8 racks, can withstand the failure of any two disks, and ensures a redundancy factor of 1.5. In multiple data center clusters, we use the ``mirror3dc`` schema, where storage groups are made up of 9 disks, 3 in each of the three data centers, which can survive the failure of a data center or disk, and ensures a redundancy factor of 3.
{{ ydb-short-name }} lets you allocate additional storage groups for available DBs as your data grows.
-
diff --git a/ydb/docs/en/core/concepts/_includes/datamodel/blockdevice.md b/ydb/docs/en/core/concepts/_includes/datamodel/blockdevice.md
index e6e1b6d29d..5141bc5226 100644
--- a/ydb/docs/en/core/concepts/_includes/datamodel/blockdevice.md
+++ b/ydb/docs/en/core/concepts/_includes/datamodel/blockdevice.md
@@ -1,4 +1,3 @@
## Network Block Store Volume
YDB can be used as a platform for creating a wide range of data storage and processing systems, for example, by implementing a [network block device](https://en.wikipedia.org/wiki/Network_block_device) on YDB. Network block devices implement an interface for a local block device, as well as ensure fault-tolerance (through redundancy) and good scalability in terms of volume size and the number of input/output operations per unit of time. The downside of a network block device is that any input/output operation on such device requires network interaction, which might increase the latency of the network device compared to the local device. You can deploy a common file system on a network block device and/or run an application directly on the block device, such as a database management system.
-
diff --git a/ydb/docs/en/core/concepts/_includes/datamodel/folder.md b/ydb/docs/en/core/concepts/_includes/datamodel/folder.md
index ab626e84ad..5edb8057d3 100644
--- a/ydb/docs/en/core/concepts/_includes/datamodel/folder.md
+++ b/ydb/docs/en/core/concepts/_includes/datamodel/folder.md
@@ -1,4 +1,3 @@
## Directories
For convenience, the service supports creating directories like in a file system, meaning the entire database consists of a directory tree, while tables and other entities are in the leaves of this tree (similar to files in the file system). A directory can host multiple subdirectories and tables. The names of the entities they contain are unique.
-
diff --git a/ydb/docs/en/core/concepts/_includes/datamodel/pq.md b/ydb/docs/en/core/concepts/_includes/datamodel/pq.md
index f9f4f61f3a..52f6071407 100644
--- a/ydb/docs/en/core/concepts/_includes/datamodel/pq.md
+++ b/ydb/docs/en/core/concepts/_includes/datamodel/pq.md
@@ -1,4 +1,3 @@
## Persistent queues
A persistent queue consists of one or more partitions, where each partition is a [FIFO](https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics)) [message queue](https://en.wikipedia.org/wiki/Message_queue) ensuring reliable delivery between two or more components. Data messages are untyped and constitute a data blob. Partitioning is a parallel processing tool that helps ensure high queue bandwidth. Mechanisms are provided to implement at least once and exactly once persistent queue delivery guarantees. A persistent queue in YDB is similar to a topic in [Apache Kafka](https://en.wikipedia.org/wiki/Apache_Kafka).
-
diff --git a/ydb/docs/en/core/concepts/_includes/datamodel/table.md b/ydb/docs/en/core/concepts/_includes/datamodel/table.md
index b71607f641..04285c76ae 100644
--- a/ydb/docs/en/core/concepts/_includes/datamodel/table.md
+++ b/ydb/docs/en/core/concepts/_includes/datamodel/table.md
@@ -56,7 +56,7 @@ You can enable running read replicas for each shard of the table in the table da
The internal state of each of the followers is restored exactly and fully consistently from the leader state.
-Besides the data status in storage, followers also receive a stream of updates from the leader. Updates are sent in real time, immediately after the commit to the log. However, they are sent asynchronously, resulting in some delay (usually no more than dozens of milliseconds, but sometimes longer in the event of cluster connectivity issues) in applying updates to followers relative to their commit on the leader. Therefore, reading data from followers is only supported in the [transaction mode](../transactions#modes) `StaleReadOnly()`.
+Besides the data status in storage, followers also receive a stream of updates from the leader. Updates are sent in real time, immediately after the commit to the log. However, they are sent asynchronously, resulting in some delay (usually no more than dozens of milliseconds, but sometimes longer in the event of cluster connectivity issues) in applying updates to followers relative to their commit on the leader. Therefore, reading data from followers is only supported in the [transaction mode](../transactions.md#modes) `StaleReadOnly()`.
If there are multiple followers, their delay from the leader may vary: although each follower of each of the shards retains internal consistency, artifacts may be observed between different shards. Please allow for this in your application code. For that same reason, it's currently impossible to perform cross-shard transactions from followers.
diff --git a/ydb/docs/en/core/concepts/_includes/index/intro.md b/ydb/docs/en/core/concepts/_includes/index/intro.md
index c9bcdd98fd..3ad1dc709c 100644
--- a/ydb/docs/en/core/concepts/_includes/index/intro.md
+++ b/ydb/docs/en/core/concepts/_includes/index/intro.md
@@ -1,7 +1,8 @@
---
-title: Yandex Database (YDB). Обзор СУБД
-description: 'Yandex Database (YDB) — это горизонтально масштабируемая распределённая отказоустойчивая СУБД. YDB спроектирована с учетом требований высокой производительности — например, обычный сервер может обрабатывать десятки тысяч запросов в секунду. В дизайн системы заложена работа с объемами данных в сотни петабайт.'
+title: Yandex Database (YDB). DBMS overview
+description: "Yandex Database (YDB): is a horizontally scalable distributed fault-tolerant DBMS. YDB is designed to meet high performance requirements. For example, a typical server can handle dozens of thousands of queries per second. The system is designed to handle hundreds of petabytes of data."
---
+
# Yandex Database (YDB) Overview
*{{ ydb-full-name }}* ({{ ydb-short-name }}) is a horizontally scalable distributed fault-tolerant DBMS. {{ ydb-short-name }} is designed to meet high performance requirements. For example, a typical server can handle dozens of thousands of queries per second. The system is designed to handle hundreds of petabytes of data. {{ ydb-short-name }} can operate in single data center and geo-distributed (cross data center) modes on a cluster of thousands of servers.
@@ -25,4 +26,3 @@ Database commands are mainly written in YQL, an SQL dialect. This gives the user
{{ ydb-short-name }} natively supports different processing options, such as [OLTP](https://en.wikipedia.org/wiki/Online_transaction_processing) and [OLAP](https://en.wikipedia.org/wiki/Online_analytical_processing). The current version offers limited analytical query support. This is why we can say that {{ ydb-short-name }} is currently an OLTP database.
{{ ydb-short-name }} is used in Yandex services as a high-performance [OLTP](https://en.wikipedia.org/wiki/Online_transaction_processing) DBMS. {{ yandex-cloud }} services such as Yandex Object Storage and Yandex Block Storage use {{ ydb-short-name }} for storing data and are based on its components.
-
diff --git a/ydb/docs/en/core/concepts/_includes/index/when_use.md b/ydb/docs/en/core/concepts/_includes/index/when_use.md
index e8c36cee47..d5873d7a43 100644
--- a/ydb/docs/en/core/concepts/_includes/index/when_use.md
+++ b/ydb/docs/en/core/concepts/_includes/index/when_use.md
@@ -8,5 +8,4 @@ YDB can be used as an alternative solution in the following cases:
* In systems with low load, when support for a separate DB instance will be a waste of money (consider using YDB in serverless mode instead).
* In systems with unpredictable or seasonally fluctuating load (you can add/reduce computing resources on request and/or in serverless mode).
* In high-load systems that shard load across relational DB instances.
-* When developing a new product that has no reliable forecast of expected load or is natively designed for an expected high load beyond the capabilities of traditional relational databases.
-
+* When developing a new product that has no reliable forecast of expected load or is natively designed for an expected high load beyond the capabilities of traditional relational databases. \ No newline at end of file
diff --git a/ydb/docs/en/core/concepts/_includes/limits-ydb.md b/ydb/docs/en/core/concepts/_includes/limits-ydb.md
index 728e22fe49..2431f3f445 100644
--- a/ydb/docs/en/core/concepts/_includes/limits-ydb.md
+++ b/ydb/docs/en/core/concepts/_includes/limits-ydb.md
@@ -41,4 +41,3 @@ The table below lists the limits that apply to query execution. The _Call_ colum
| Maximum number of sessions per cluster node | 1000 | CreateSession | Using the library for working with YDB, an application can create sessions within a connection. Sessions are linked to a node. You can create a limited number of sessions with a single node | OVERLOADED |
| Maximum query text length | 10 KB | ExecuteDataQuery | Limit on the length of YQL query text | BAD_REQUEST |
| Maximum size of parameter values | 50 MB | ExecuteDataQuery | Limit on the total size of parameters passed when executing a previously prepared query | BAD_REQUEST |
-
diff --git a/ydb/docs/en/core/concepts/_includes/scan_query.md b/ydb/docs/en/core/concepts/_includes/scan_query.md
index f589df1461..1060320a81 100644
--- a/ydb/docs/en/core/concepts/_includes/scan_query.md
+++ b/ydb/docs/en/core/concepts/_includes/scan_query.md
@@ -32,7 +32,7 @@ Despite the fact that *Scan Queries* obviously don't interfere with the executio
## How do I use it?
-Like other types of queries, *Scan Queries* are available via the [консоль управления]({{ link-console-main }}) (the query must specify `PRAGMA Kikimr.ScanQuery = "true";`), [CLI](../../reference/ydb-cli/commands/scan-query.md), and [SDK](../../reference/ydb-sdk/index.md).
+Like other types of queries, *Scan Queries* are available via the [management console]({{ link-console-main }}) (the query must specify `PRAGMA Kikimr.ScanQuery = "true";`), [CLI](../../reference/ydb-cli/commands/scan-query.md), and [SDK](../../reference/ydb-sdk/index.md).
{% if oss %}
@@ -52,5 +52,4 @@ class TTableClient {
};
```
-{% endif %}
-
+{% endif %} \ No newline at end of file
diff --git a/ydb/docs/en/core/concepts/_includes/secondary_indexes.md b/ydb/docs/en/core/concepts/_includes/secondary_indexes.md
index 9674b11680..9e41aec395 100644
--- a/ydb/docs/en/core/concepts/_includes/secondary_indexes.md
+++ b/ydb/docs/en/core/concepts/_includes/secondary_indexes.md
@@ -67,6 +67,7 @@ Creating an index is an asynchronous operation. If the client-server connection
--columns title \
series
```
+
* `--endpoint`: DB endpoint.
* `--database`: Full DB path.
* `-sync|-async`: Index type.
@@ -229,4 +230,3 @@ If you don't specify the index type, a synchronous index is created by default.
#### What's next
For other examples of working with secondary indexes, see the [recommendations](../../best_practices/secondary_indexes.md).
-
diff --git a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/01_intro.md b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/01_intro.md
index 521157b2c6..d1ccf18914 100644
--- a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/01_intro.md
+++ b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/01_intro.md
@@ -1,17 +1,17 @@
---
-title: Режимы работы Serverless и Dedicated в Yandex Database
-description: "Базы YDB могут быть созданы в двух режимах Dedicated и Serverless. Режим работы Dedicated предполагает, что ресурсы на инстансы Таблеток и на выполнение YQL-запросов выбираются из явно выделенных для базы данных compute ресурсов. В Serverless режиме работы инфраструктура YDB определяет сколько вычислительных ресурсов необходимо выделить для обслуживания пользовательской базы."
+title: Serverless and Dedicated modes in Yandex Database
+description: "YDB databases can be created in two modes Dedicated and Serverless. Dedicated mode of operation assumes that resources for Tablet instances and for executing YQL queries are selected from resources explicitly allocated for the compute database. In the Serverless mode of operation, the YDB infrastructure determines how many computing resources need to be allocated to service the user base."
keywords:
- ydb
- serverless
- dedicated
editable: false
---
+
# Serverless and Dedicated modes {{ ydb-full-name }}
You can create and use multiple {{ ydb-short-name }} databases. When creating a database, one of two operating modes is selected for each database: Serverless or Dedicated. The mode can't be changed later.
* _Serverless_: A DB that doesn't require you to configure, administer, or monitor load or manage resources. To create a database, you only need to enter a name, and you'll get the URL for the connection. Payment is charged for the execution of queries and the actual amount of stored data.
-* _Dedicated_: You determine the computing resources that will be reserved for the database: CPU and RAM on the nodes, the number of nodes, and the storage size. You need to make sure there are sufficient resources to handle the load and add more when necessary. Payment is charged for dedicated resources per hour, regardless of their actual use.
-
+* _Dedicated_: You determine the computing resources that will be reserved for the database: CPU and RAM on the nodes, the number of nodes, and the storage size. You need to make sure there are sufficient resources to handle the load and add more when necessary. Payment is charged for dedicated resources per hour, regardless of their actual use. \ No newline at end of file
diff --git a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/02_sls_pars.md b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/02_sls_pars.md
index 636e7b68bc..60be12a250 100644
--- a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/02_sls_pars.md
+++ b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/02_sls_pars.md
@@ -39,4 +39,3 @@ The **Maximum amount of data** limit for a serverless database limits the amount
You can change the **Maximum amount of data** limit interactively at any time, both via the graphical console and the CLI and raise or reduce it without limitations. This allows you to quickly adjust it as needed.
We don't recommend setting the **Maximum amount of data** limit below the current actual amount because in this state, all data modification operations, including DELETE, become unavailable. You will only be able to reduce the amount of data with the DROP TABLE or DROP INDEX commands. If the limit is accidentally set below the actual volume, we recommend returning it to the operating value exceeding the actual volume with some redundancy.
-
diff --git a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/10_arch_diff.md b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/10_arch_diff.md
index 2212f72d6f..d0f6aa8e92 100644
--- a/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/10_arch_diff.md
+++ b/ydb/docs/en/core/concepts/_includes/serverless_and_dedicated/10_arch_diff.md
@@ -16,5 +16,4 @@ Dedicated mode assumes that resources for tablet instances and for executing YQL
In Serverless mode, the YDB infrastructure determines the amount of computing resources to be allocated to serve the user database. The amount of allocated resources can be either very large (an arbitrary number of cores) or very small (significantly less than one core). If a user created a DB that contains a single table with a single entry and makes DB queries very rarely, YDB actually uses a small amount of RAM on tablet instances that are part of the user DB. This is possible due to the fact that the user database components are objects rather than processes. If the load increases, the DB components start using more CPU time and memory. If the load grows to the point where there are not enough VM resources, the YDB infrastructure can balance the system granularly, generating tablet instances on other VMs.
-This technology lets you package virtual entities (tablet instances) very tightly together into physical resources based on actual consumption. This makes it possible to invoice the user for the operations performed rather than the allocated resources.
-
+This technology lets you package virtual entities (tablet instances) very tightly together into physical resources based on actual consumption. This makes it possible to invoice the user for the operations performed rather than the allocated resources. \ No newline at end of file
diff --git a/ydb/docs/en/core/concepts/_includes/transactions.md b/ydb/docs/en/core/concepts/_includes/transactions.md
index 061f137708..c898223d0c 100644
--- a/ydb/docs/en/core/concepts/_includes/transactions.md
+++ b/ydb/docs/en/core/concepts/_includes/transactions.md
@@ -28,7 +28,7 @@ For more information about supported YQL constructs, see the [YQL documentation]
Listed below are the features and limitations of YQL support in YDB, which might not be obvious at first glance and are worth noting.
* Multi-statement transactions (transactions made up of a sequence of YQL statements) are supported. Transactions may interact with client software, or in other words, client interactions with the database might look as follows: `BEGIN; make a SELECT; analyze the SELECT results on the client side; ...; make an UPDATE; COMMIT`. We should note that if the transaction body is fully formed before accessing the database, it will be processed more efficiently.
-* YDB does not support transactions that combine DDL and DML queries. The traditional [ACID](https://ru.wikipedia.org/wiki/ACID) transaction paradigm only applies to DML queries, meaning that change data. DDL queries must be idempotent, meaning repeatable if an error occurs. If you need to apply an action to a schema, remember that each action is transactional, while a set of actions is not.
+* YDB does not support transactions that combine DDL and DML queries. The traditional [ACID](https://en.wikipedia.org/wiki/ACID) transaction paradigm only applies to DML queries, meaning that change data. DDL queries must be idempotent, meaning repeatable if an error occurs. If you need to apply an action to a schema, remember that each action is transactional, while a set of actions is not.
* The version of YQL in YDB uses the [Optimistic concurrency control](https://en.wikipedia.org/wiki/Optimistic_concurrency_control) mechanism. Optimistic locking is applied to entities affected during a transaction. When the transaction is complete, the mechanism verifies that the locks have not been invalidated. For the user, locking optimism means that when transactions are competing with one another, the one that finishes first wins. Competing transactions fail with the ```Transaction locks invalidated``` error.
* All changes made during the transaction accumulate in the database server memory and are committed when the transaction completes. If the locks are not invalidated, all the changes accumulated are committed atomically, but if at least one lock is invalidated, none of the changes are committed. The above model involves certain restrictions: changes made by a single transaction must fit inside the available memory, and the transaction "doesn't see" its changes.
@@ -49,4 +49,3 @@ For more information about YQL support in YDB, see the [YQL documentation](../..
A database table in YDB can be sharded by the range of the primary key values. Different table shards can be served by different distributed database servers (including ones in different locations). They can also move independently between servers to enable rebalancing or ensure shard operability if servers or network equipment goes offline.
YDB supports distributed transactions. Distributed transactions are transactions that affect more than one shard of one or more tables. They require more resources and take more time. While point reads and writes may take up to 10 ms in 99 percentile, distributed transactions typically take from 20 to 500 ms.
-
diff --git a/ydb/docs/en/core/concepts/_includes/ttl.md b/ydb/docs/en/core/concepts/_includes/ttl.md
index 1ef41c3f0a..68f34b9ae8 100644
--- a/ydb/docs/en/core/concepts/_includes/ttl.md
+++ b/ydb/docs/en/core/concepts/_includes/ttl.md
@@ -49,7 +49,7 @@ Data is deleted by the *Background Removal Operation* (*BRO*), consisting of two
- `Uint32`
- `Uint64`
- `DyNumber`
-* The value of the TTL column of the numeric type (`Uint32`, `Uint64`, or `DyNumber`) is interpreted as a value from the [Unix era](https://ru.wikipedia.org/wiki/Unix-время) set in:
+* The value of the TTL column of the numeric type (`Uint32`, `Uint64`, or `DyNumber`) is interpreted as a value from the [Unix era](https://en.wikipedia.org/wiki/Unix_time) set in:
- Seconds
- Milliseconds
- Microseconds
@@ -62,7 +62,7 @@ Data is deleted by the *Background Removal Operation* (*BRO*), consisting of two
Currently, you can manage TTL settings using:
* [YQL](../../yql/reference/index.md)
-* [Консольного клиента {{ ydb-short-name }}]{% if audience != "external" %}(https://cloud.yandex.ru/docs/ydb/quickstart/yql-api/ydb-cli){% else %}(../../quickstart/yql-api/ydb-cli.md){% endif %}.
+* [Console client {{ ydb-short-name }}]{% if audience != "external" %}(https://cloud.yandex.com/en-ru/docs/ydb/quickstart/yql-api/ydb-cli){% else %}(../../quickstart/yql-api/ydb-cli.md){% endif %}.
* {{ ydb-short-name }} {% if oss %}C++ and{% endif %} Python [SDK](../../reference/ydb-sdk/index.md)
{% note info %}
@@ -241,4 +241,3 @@ The current TTL settings can be obtained from the table description:
```
{% endlist %}
-
diff --git a/ydb/docs/en/core/concepts/datatypes.md b/ydb/docs/en/core/concepts/datatypes.md
index 21093cf9b4..1d5263968a 100644
--- a/ydb/docs/en/core/concepts/datatypes.md
+++ b/ydb/docs/en/core/concepts/datatypes.md
@@ -1,4 +1,3 @@
# Data types {{ ydb-name }}
{{ ydb-short-name }} uses YQL data types.
-
diff --git a/ydb/docs/en/core/concepts/toc_i.yaml b/ydb/docs/en/core/concepts/toc_i.yaml
index 0df7306a8d..5c05a1854f 100644
--- a/ydb/docs/en/core/concepts/toc_i.yaml
+++ b/ydb/docs/en/core/concepts/toc_i.yaml
@@ -1,11 +1,11 @@
items:
-- { name: Overview, href: index.md }
-- { name: Terms and definitions, href: databases.md }
-- { name: Data model and schema, href: datamodel.md }
+- { name: Overview, href: index.md }
+- { name: Terms and definitions, href: databases.md }
+- { name: Data model and schema, href: datamodel.md }
- { name: Serverless and Dedicated operation modes, href: serverless_and_dedicated.md }
-- { name: Data types, href: datatypes.md }
-- { name: Transactions, href: transactions.md }
-- { name: Secondary indexes, href: secondary_indexes.md }
-- { name: Time to Live (TTL), href: ttl.md }
-- { name: Scan queries, href: scan_query.md }
-- { name: Database limits, href: limits-ydb.md }
+- { name: Data types, href: datatypes.md }
+- { name: Transactions, href: transactions.md }
+- { name: Secondary indexes, href: secondary_indexes.md }
+- { name: Time to Live (TTL), href: ttl.md }
+- { name: Scan queries, href: scan_query.md }
+- { name: Database limits, href: limits-ydb.md }
diff --git a/ydb/docs/en/core/deploy/orchestrated/aws_eks.md b/ydb/docs/en/core/deploy/orchestrated/aws_eks.md
index b302c0e6eb..a4b7b7140a 100644
--- a/ydb/docs/en/core/deploy/orchestrated/aws_eks.md
+++ b/ydb/docs/en/core/deploy/orchestrated/aws_eks.md
@@ -18,7 +18,7 @@ To create a [{{ ydb-name }}](https://cloud.yandex.ru/docs/ydb/) cluster using [{
{% endnote %}
- {% cut "Как создать кластер {{ k8s }}" %}
+ {% cut "How to create a {{ k8s }} cluster" %}
{% list tabs %}
diff --git a/ydb/docs/en/core/faq/_includes/common.md b/ydb/docs/en/core/faq/_includes/common.md
index 99dd6baa17..0289917842 100644
--- a/ydb/docs/en/core/faq/_includes/common.md
+++ b/ydb/docs/en/core/faq/_includes/common.md
@@ -1,7 +1,8 @@
---
-title: "Yandex Database. Ответы на вопросы"
-description: "Что такое Yandex Database? Для каких задач стоит использовать Yandex Database, а для каких виртуальные машины с базами данных? Какую часть работы по управлению и сопровождению баз данных берет на себя Yandex Database? Ответы на эти и другие вопросы в данной статье."
+title: "Yandex Database. FAQ"
+description: "What is Yandex Database? For what tasks is it worth using Yandex Database, and for which virtual machines with databases? What part of the management and maintenance of databases does Yandex Database take on? Answers to these and other questions in this article."
---
+
# General questions about {{ ydb-name }}
#### What is {{ ydb-short-name }}? {#what-is-ydb}
diff --git a/ydb/docs/en/core/getting_started/_includes/useful_links.md b/ydb/docs/en/core/getting_started/_includes/useful_links.md
index 146f5f8867..50751e8f7a 100644
--- a/ydb/docs/en/core/getting_started/_includes/useful_links.md
+++ b/ydb/docs/en/core/getting_started/_includes/useful_links.md
@@ -3,6 +3,5 @@
{% if oss %}
* [YDB OpenSource website](https://ydb.tech){% endif %}
-* [Yandex.Cloud management console](https://console.cloud.yandex.ru)
+* [Yandex.Cloud management console](https://console.cloud.yandex.com)
* [GitHub account ydb-platform](https://github.com/ydb-platform)
-
diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/01_intro.md b/ydb/docs/en/core/getting_started/_includes/ydb_docker/01_intro.md
index 8f85c097bb..3ae2ef2f0f 100644
--- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/01_intro.md
+++ b/ydb/docs/en/core/getting_started/_includes/ydb_docker/01_intro.md
@@ -13,4 +13,3 @@ To save the database state locally, mount the `/ydb_data` directory on the host
When a local database is running, some tasks may require a significant portion of the host system resources.
{% endnote %}
-
diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/02_install.md b/ydb/docs/en/core/getting_started/_includes/ydb_docker/02_install.md
index 822cd6b077..41bff9637c 100644
--- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/02_install.md
+++ b/ydb/docs/en/core/getting_started/_includes/ydb_docker/02_install.md
@@ -17,5 +17,4 @@ Output:
```bash
REPOSITORY TAG IMAGE ID CREATED SIZE
cr.yandex/yc/yandex-docker-local-ydb latest b73c5c1441af 2 months ago 793MB
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/03_start.md b/ydb/docs/en/core/getting_started/_includes/ydb_docker/03_start.md
index 82ef60076d..33eca0cbc7 100644
--- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/03_start.md
+++ b/ydb/docs/en/core/getting_started/_includes/ydb_docker/03_start.md
@@ -34,4 +34,3 @@ It may take several minutes to initialize the Docker container, depending on the
* `YDB_LOCAL_SURVIVE_RESTART=true` enables you to restart a container without losing data.
* `YDB_USE_IN_MEMORY_PDISKS=true` enables you to store all your data in memory. If this option is enabled, restarting the container with a local {{ ydb-short-name }} instance will result in complete data loss.
* `YDB_DEFAULT_LOG_LEVEL=<level>` enables you to set the logging level.. Valid levels: `CRIT`, `ERROR`, `WARN`, `NOTICE`, `INFO`.
-
diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/04_request.md b/ydb/docs/en/core/getting_started/_includes/ydb_docker/04_request.md
index fdd2dc5455..aae9233774 100644
--- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/04_request.md
+++ b/ydb/docs/en/core/getting_started/_includes/ydb_docker/04_request.md
@@ -34,5 +34,4 @@ sudo docker exec <CONTAINER-ID> /ydb -e localhost:2135 -d /local table query exe
├─────────┤
| 1 |
└─────────┘
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/getting_started/_includes/ydb_docker/06_license.md b/ydb/docs/en/core/getting_started/_includes/ydb_docker/06_license.md
index 1d4fb8fa7b..b5d7598b93 100644
--- a/ydb/docs/en/core/getting_started/_includes/ydb_docker/06_license.md
+++ b/ydb/docs/en/core/getting_started/_includes/ydb_docker/06_license.md
@@ -13,4 +13,3 @@ View all the included components and their licenses:
```bash
sudo docker run --rm -it --entrypoint cat cr.yandex/yc/yandex-docker-local-ydb THIRD_PARTY_LICENSES
```
-
diff --git a/ydb/docs/en/core/getting_started/index.md b/ydb/docs/en/core/getting_started/index.md
index f7132fcda2..28128865c0 100644
--- a/ydb/docs/en/core/getting_started/index.md
+++ b/ydb/docs/en/core/getting_started/index.md
@@ -1,5 +1,6 @@
---
-title: Начало работы с Yandex Database (YDB). Обзор
+title: Getting started with Yandex Database (YDB). Overview
---
+
# Getting started with {{ ydb-name }}
diff --git a/ydb/docs/en/core/getting_started/useful_links.md b/ydb/docs/en/core/getting_started/useful_links.md
index c5f779edb2..a0f91ce498 100644
--- a/ydb/docs/en/core/getting_started/useful_links.md
+++ b/ydb/docs/en/core/getting_started/useful_links.md
@@ -10,5 +10,5 @@
* [ydb-announces@](https://ml.yandex-team.ru/lists/ydb-announces/): newsletter for announcements
* [st/YDBREQUESTS](https://st.yandex-team.ru/YDBREQUESTS/): Tracker queue for user requests
* [st/YDBOPS](https://st.yandex-team.ru/YDBOPS/): Tracker queue for service operation issues and resolving incidents
-* [st/KIKIMR](https://st.yandex-team.ru/KIKIMR/): Tracker queue for YandexDB/KiKiMR development tasks {% endif %}
-
+* [st/KIKIMR](https://st.yandex-team.ru/KIKIMR/): Tracker queue for YandexDB/KiKiMR development tasks
+{% endif %} \ No newline at end of file
diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/01_intro.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/01_intro.md
index 738b9ffb82..804c23c231 100644
--- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/01_intro.md
+++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/01_intro.md
@@ -1,17 +1,16 @@
---
-title: "Резервное копирование Yandex Database (YDB)"
-description: "В разделе описаны поддерживаемые способы создания резервных копий баз данных Yandex Database (YDB) и восстановления из созданных ранее резервных копий. YDB позволяет использовать для создания резервных копий csv-файлы на файловой системе и AWS S3-совместимые хранилища."
+title: "Yandex Database (YDB) backups"
+description: "This section describes supported methods for creating YDB database backups and restoring data from previously created backups. YDB lets you use the following destinations to create backups: CSV files on the file system and AWS S3-compatible storage."
---
+
# Backups
This section describes supported methods for creating YDB database backups and restoring data from previously created backups. {{ ydb-short-name }} lets you use the following destinations to create backups:
-
* CSV files on the file system.
* AWS S3-compatible storage.
-{% note warning "Влияние резервного копирования на производительность" %}
+{% note warning %}
Backups may negatively affect the database interaction indicators. Queries may take longer to execute. Before performing a database backup under load in production databases, test the process in the testing environment.
-{% endnote %}
-
+{% endnote %} \ No newline at end of file
diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/03_limitations.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/03_limitations.md
index 73afca2d09..061d70fd00 100644
--- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/03_limitations.md
+++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/03_limitations.md
@@ -1,4 +1,3 @@
## Limitations {#limitations}
-In the current implementation, a maximum of 1000 tables can be backed up in YDB at a time.
-
+In the current implementation, a maximum of 1000 tables can be backed up in YDB at a time. \ No newline at end of file
diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_1_header.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_1_header.md
index 8eaf4ac215..bf9d5e98af 100644
--- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_1_header.md
+++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_1_header.md
@@ -7,4 +7,3 @@ Saving the structure of the `backup` directory in the `$YDB_DB_PATH` database to
```
For each directory in the database, a file system directory is created. For each table, a directory is created in the file system to place the structure description file in. Table data is saved to one or more `CSV` files, one file line per table row.
-
diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_2_body.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_2_body.md
index 59bfcf7d4f..b0279e77cb 100644
--- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_2_body.md
+++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/04_fs_backup_2_body.md
@@ -25,4 +25,3 @@ Running the `{{ ydb-cli }} tools dump` command with the `--scheme-only` option o
```
{{ ydb-cli }} -e $YDB_ENDPOINT -d $YDB_DB_PATH tools dump -p $YDB_DB_PATH/examples -o my_backup_of_basic_example/ --scheme-only
```
-
diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/05_fs_restore.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/05_fs_restore.md
index 471977fe8e..d493753424 100644
--- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/05_fs_restore.md
+++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/05_fs_restore.md
@@ -15,4 +15,3 @@ The command below checks that all tables saved in the `my_backup_of_basic_exampl
```
{{ ydb-cli }} -e $YDB_ENDPOINT -d $YDB_DB_PATH tools restore -p $YDB_DB_PATH/restored_basic_example -i my_backup_of_basic_example/ --dry-run
```
-
diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_3_access_keys.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_3_access_keys.md
index 5674520ae2..17428130db 100644
--- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_3_access_keys.md
+++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_3_access_keys.md
@@ -4,7 +4,6 @@ Access keys are used for authentication and authorization in S3-compatible stora
* Through the `--access-key` and `--secret-key` command line options.
* Using the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables.
-* Through the `~/.aws/credentials` file created and used by the [AWS CLI](https://aws.amazon.com/ru/cli/).
+* Through the `~/.aws/credentials` file created and used by the [AWS CLI](https://aws.amazon.com/cli/).
The settings apply in the order described above. For example, if you use all three ways to pass the access_key or secret_key value at the same time, the values passed through the command-line options will be used.
-
diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_4_export.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_4_export.md
index 61790d2130..7cbf80fffa 100644
--- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_4_export.md
+++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_4_export.md
@@ -50,7 +50,7 @@ aws --endpoint-url=https://{{ s3-storage-host }} s3 ls testdbbackups/20200601/
PRE series/
```
-{% note info "Работа с директориями" %}
+{% note info %}
To back up all tables in the YDB directory, specify the path to the directory as the source.
diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_5_restore.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_5_restore.md
index 68202ff188..3eab33f47a 100644
--- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_5_restore.md
+++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_5_restore.md
@@ -2,5 +2,4 @@
First, connect the bucket with the YDB database backup files in S3-compatible storage to make the database available through operations on the file system.
-When done, upload the data from the backup in YDB following the instructions described in [Restoring data from backups in the file system](#filesystem_restore).
-
+When done, upload the data from the backup in YDB following the instructions described in [Restoring data from backups in the file system](#filesystem_restore). \ No newline at end of file
diff --git a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_6_forget.md b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_6_forget.md
index ce96d3ff04..a04b8c6362 100644
--- a/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_6_forget.md
+++ b/ydb/docs/en/core/maintenance/_includes/backup_and_recovery/06_s3_6_forget.md
@@ -6,5 +6,4 @@ To delete the table copies from the DB and the completed operation from the list
```
{{ ydb-cli }} -e $YDB_ENDPOINT -d $YDB_DB_PATH operation forget 'ydb://export/6?id=283824558378666&kind=s3'
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/maintenance/embedded_monitoring/charts.md b/ydb/docs/en/core/maintenance/embedded_monitoring/charts.md
index e3f52b2be8..a0f21dbf54 100644
--- a/ydb/docs/en/core/maintenance/embedded_monitoring/charts.md
+++ b/ydb/docs/en/core/maintenance/embedded_monitoring/charts.md
@@ -8,4 +8,3 @@ The main metrics of the system are displayed on the dashboard:
* **Memory Usage**: RAM utilization by nodes.
* **Disk Space Usage**: Disk space utilization by nodes.
* **SelfPing**: The highest actual delivery time of deferred messages in the actor system over the measurement interval. Measured for messages with a 10 ms delivery delay. If this value grows, it might indicate microbursts of workload, high CPU utilization, or displacement of the {{ ydb-short-name }} process from CPU cores by other processes.
-
diff --git a/ydb/docs/en/core/maintenance/embedded_monitoring/interconnect_overview.md b/ydb/docs/en/core/maintenance/embedded_monitoring/interconnect_overview.md
index a2df6e35a5..8a0cda4147 100644
--- a/ydb/docs/en/core/maintenance/embedded_monitoring/interconnect_overview.md
+++ b/ydb/docs/en/core/maintenance/embedded_monitoring/interconnect_overview.md
@@ -12,4 +12,3 @@ Shows, for every other node:
* system clock difference
* connection availability
* last written error
-
diff --git a/ydb/docs/en/core/maintenance/embedded_monitoring/logs.md b/ydb/docs/en/core/maintenance/embedded_monitoring/logs.md
index a68bdda591..1e3d4d9b30 100644
--- a/ydb/docs/en/core/maintenance/embedded_monitoring/logs.md
+++ b/ydb/docs/en/core/maintenance/embedded_monitoring/logs.md
@@ -37,4 +37,3 @@ To change the logging level:
1. To change the logging level for individual components, use the table under `Component log settings`. In the line with the name of the component whose logging level you want to change, in the `Component` column, select the desired logging level from the drop-down list in the `Log level` column.
1. To save changes, click `Submit`
-
diff --git a/ydb/docs/en/core/maintenance/embedded_monitoring/ydb_monitoring.md b/ydb/docs/en/core/maintenance/embedded_monitoring/ydb_monitoring.md
index ef25fb0bf2..fec59ef2fe 100644
--- a/ydb/docs/en/core/maintenance/embedded_monitoring/ydb_monitoring.md
+++ b/ydb/docs/en/core/maintenance/embedded_monitoring/ydb_monitoring.md
@@ -16,13 +16,13 @@ An example of the page layout is shown in the screenshot below.
In the upper-right corner of the page, you can see details about the node that created the current page:
-* host
-* node uptime
-* ydb version run by the node
+* host.
+* node uptime.
+* ydb version run by the node.
Below is the cluster summary:
-* cluster name, list of running tablets
+* cluster name, list of running tablets.
* **Nodes**: The number of nodes.
* **Load**: The total CPU utilization level on all nodes.
* **Storage**: The used/total storage space.
@@ -77,6 +77,7 @@ http://<endpoint>:8765/monitoring/node/<node-id>/
Information about the node is presented in the following sections:
* **Pools**: CPU utilization broken down by the internal stream pools, with roughly the following pool functions:
+
* **System**: The tasks of critical system components.
* **User**: User tasks, queries executed by tablets.
* **Batch**: Long-running background tasks.
@@ -86,12 +87,14 @@ Information about the node is presented in the following sections:
High pool utilization might degrade performance and increase the system response time.
* **Common info**: Basic information about the node:
+
* **Version**: The {{ ydb-short-name }} version.
* **Uptime**: The node uptime.
* **DC**: The availability zone where the node resides.
* **Rack**: The ID of the rack where the node resides.
* **Load average**: Average host CPU utilization for different time intervals:
+
* 1 minute.
* 5 minutes.
* 15 minutes.
@@ -149,6 +152,7 @@ In the `Tenant Info` section, you can see the following information:
* **Pools**: The total CPU utilization by the tenant nodes broken down by internal stream pools (for more information about pools, see the [tenant page](#tenant_page)).
* **Metrics**: Data about tablet utilization for this tenant:
+
* **Memory**: The RAM utilized by tablets.
* **CPU**: CPU utilized by tablets.
* **Storage**: The amount of data stored by tablets.
@@ -223,4 +227,3 @@ The indicator colors have the following meaning:
* **Red**: There are critical problems, the component is down (or runs with limitations).
If a component includes other components, then in the absence of its own issues, the state is determined by aggregating the states of its parts.
-
diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/copy.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/copy.md
index aa7d837469..483618514f 100644
--- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/copy.md
+++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/copy.md
@@ -24,7 +24,7 @@ View a description of the command to copy a table:
| `--client-timeout <value>` | Client side operation timeout, ms. |
| `--operation-timeout <value>` | Server side operation timeout, ms. |
| `--cancel-after <value>` | Operation lifetime, after which the operation is canceled, ms. |
-| `--item <свойство>=<value>,...` | Operation parameters. Possible values:<br/><ul><li>`destination`, `dst`, or `d` — required parameter, the path of the destination table. If the destination path contains folders, they must be created in advance. The table with the destination name should not exist.</li><li>`source`, `src`, or `s` — required parameter, the path of the source table.</li></ul> |
+| `--item <value>=<value>,...` | Operation parameters. Possible values:<br/><ul><li>`destination`, `dst`, or `d` — required parameter, the path of the destination table. If the destination path contains folders, they must be created in advance. The table with the destination name should not exist.</li><li>`source`, `src`, or `s` — required parameter, the path of the source table.</li></ul> |
## Examples {#examples}
diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/rename.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/rename.md
index 6ec6c4225e..08af088704 100644
--- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/rename.md
+++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/rename.md
@@ -22,7 +22,7 @@ ydb tools rename --help
| Parameter name | Parameter description |
| --- | --- |
| `--timeout <value>` | Operation timeout, ms. |
-| `--item <свойство>=<value>,...` | Operation parameters. Possible values:<br/><ul><li>`destination`, `dst`, or `d`: Required parameter, the path to the destination table. If the destination path contains directories, they must be created in advance.</li> <li>`source`, `src`, or `s`: Required parameter, the path of the source table.</li><li>`replace`, `force`: Optional parameter. If the value is `True`, the destination table must exist and will be overwritten. `False`: The destination table must not exist. Default value: `False`.</li></ul> |
+| `--item <value>=<value>,...` | Operation parameters. Possible values:<br/><ul><li>`destination`, `dst`, or `d`: Required parameter, the path to the destination table. If the destination path contains directories, they must be created in advance.</li> <li>`source`, `src`, or `s`: Required parameter, the path of the source table.</li><li>`replace`, `force`: Optional parameter. If the value is `True`, the destination table must exist and will be overwritten. `False`: The destination table must not exist. Default value: `False`.</li></ul> |
## Examples {#examples}
diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/restore.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/restore.md
index 42cd5c6aa3..d8875bd13f 100644
--- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/restore.md
+++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/tools/restore.md
@@ -19,15 +19,14 @@ View a description of the command to restore data from a dump:
## Parameters of the subcommand {#options}
-| Parameter name | Parameter description |
-| --- | --- |
-| `-p`<br/>`--path` | The path to the folder or table to dump.<br/>Default value is `.`, a full database dump will be performed. |
-| `-o`<br/>`--output` | Required parameter.<br/>The path on the local file system where the dump objects will be placed. The dump folder must not exist or must be empty. |
-| `--scheme-only` | Make a dump of the DB schema only. Possible values:<br/><ul><li>`0`: No.</li><li>`1`: Yes.</li>Default value is `0`. |
-| `--avoid-copy` | Avoid copying. Possible values:<br/><ul><li>`0`: No.</li><li>`1`: Yes.</li>Default value is `0`. |
-| `--save-partial-result` | Save the results of an incomplete dump. Possible values:<br/><ul><li>`0`: No.</li><li>`1`: Yes.</li>Default value is `0`. |
-| `--consistency-level` | Consistency level. Possible values:<br/><ul><li>`database`: Consistency at the DB level.</li><li>`table`: Consistency at the table level.</li>Default value is `database`. |
-
+Parameter name | Parameter description
+--- | ---
+`-p`<br/>`--path` | The path to the folder or table to dump.<br/>Default value is `.`, a full database dump will be performed.
+`-o`<br/>`--output` | Required parameter.<br/>The path on the local file system where the dump objects will be placed. The dump folder must not exist or must be empty.
+`--scheme-only` | Make a dump of the DB schema only. Possible values:<br/><ul><li>`0`: No.</li><li>`1`: Yes.</li>Default value is `0`.
+`--avoid-copy` | Avoid copying. Possible values:<br/><ul><li>`0`: No.</li><li>`1`: Yes.</li>Default value is `0`.
+`--save-partial-result` | Save the results of an incomplete dump. Possible values:<br/><ul><li>`0`: No.</li><li>`1`: Yes.</li>Default value is `0`.
+`--consistency-level` | Consistency level. Possible values:<br/><ul><li>`database`: Consistency at the DB level.</li><li>`table`: Consistency at the table level.</li>Default value is `database`.
`-p <value>`<br/>`--path <value>` | Required parameter.<br/>The path in the DB by which the folder or table is restored.
`-o <value>`<br/>`--output <value>` | Required parameter.<br/>The path on the local file system where the dump objects are located.
`--dry-run` | Do not restore tables. Make sure that:<br/><ul><li>— All dump tables are present in the DB.</li><li>— Schemas of all dump tables correspond to schemas of DB tables.
diff --git a/ydb/docs/en/core/reference/ydb-cli/index.md b/ydb/docs/en/core/reference/ydb-cli/index.md
index c5d1f7514d..b297642e85 100644
--- a/ydb/docs/en/core/reference/ydb-cli/index.md
+++ b/ydb/docs/en/core/reference/ydb-cli/index.md
@@ -1,8 +1,7 @@
# {{ ydb-short-name }} CLI
-The {{ ydb-short-name }} command-line interface (CLI) provides downloadable software for managing your data in YDB.
+The {{ ydb-short-name }} command-line interface (CLI) provides downloadable software for managing your data in {{ ydb-short-name }}.
To get started with the {{ ydb-short-name }} CLI:
-1. [Take a look at {{ ydb-short-name }} CLI commands](commands/index.md).
-
+1. [Take a look at {{ ydb-short-name }} CLI commands](commands/index.md).
diff --git a/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml b/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml
index 1a974f40b6..1f77c8f30e 100644
--- a/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml
+++ b/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml
@@ -35,7 +35,7 @@ items:
href: commands/scan-query.md
- name: Utilities
items:
- # - name: Копирование таблиц
+ # - name: Copy tables
# href: commands/tools/copy.md
- name: Renaming tables
href: commands/tools/rename.md \ No newline at end of file
diff --git a/ydb/docs/en/core/reference/ydb-sdk/_includes/index/examples.md b/ydb/docs/en/core/reference/ydb-sdk/_includes/index/examples.md
index efc694b10a..ed8c879a42 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/_includes/index/examples.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/_includes/index/examples.md
@@ -1,2 +1 @@
The [Test app](../../example/index.md) section describes the code of test apps implemented using the YDB SDKs for different programming languages.
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/_includes/index/intro.md b/ydb/docs/en/core/reference/ydb-sdk/_includes/index/intro.md
index 191c7e4e84..1d51bc9210 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/_includes/index/intro.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/_includes/index/intro.md
@@ -3,7 +3,6 @@
OpenSource SDKs in the following programming languages are available to work with YDB:
{% if cpp_oss_link %}
-
- C++ [{{ cpp_oss_link }}]({{ cpp_oss_link }}){% endif %}
- Python [https://github.com/yandex-cloud/ydb-python-sdk](https://github.com/yandex-cloud/ydb-python-sdk)
- Go [https://github.com/yandex-cloud/ydb-go-sdk](https://github.com/yandex-cloud/ydb-go-sdk)
@@ -11,4 +10,3 @@ OpenSource SDKs in the following programming languages are available to work wit
- PHP [https://github.com/yandex-cloud/ydb-php-sdk](https://github.com/yandex-cloud/ydb-php-sdk)
- Java [https://github.com/yandex-cloud/ydb-java-sdk](https://github.com/yandex-cloud/ydb-java-sdk)
- C# (.NET) [https://github.com/ydb-platform/ydb-dotnet-sdk](https://github.com/ydb-platform/ydb-dotnet-sdk)
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/addition.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/addition.md
index 22977978e8..225e85e098 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/addition.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/addition.md
@@ -3,4 +3,3 @@
The article is being updated.
{% endnote %}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/pragmatablepathprefix.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/pragmatablepathprefix.md
index 6760da6cf3..bc1ad1a3a7 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/pragmatablepathprefix.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/auxilary/pragmatablepathprefix.md
@@ -6,4 +6,3 @@ SELECT * FROM episodes;
```
For more information about PRAGMA YQL, see the [YQL documentation](../../../../../yql/reference/index.md).
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-cpp.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-cpp.md
index 1cd805aa88..7be5df695a 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-cpp.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-cpp.md
@@ -430,4 +430,3 @@ static TStatus ExplicitTclTransaction(TSession session, const TString& path, con
```
{% include [error_handling.md](steps/50_error_handling.md) %}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-dotnet.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-dotnet.md
index 456d2d6548..b262272b9a 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-dotnet.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-dotnet.md
@@ -185,4 +185,3 @@ public void executeScanQuery()
```
{% include [error_handling.md](steps/50_error_handling.md) %}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-java.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-java.md
index 942e6940f8..3e7baa65c0 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-java.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-java.md
@@ -437,4 +437,3 @@ private Status explicitTcl(Session session) {
```
{% include [error_handling.md](steps/50_error_handling.md) %}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-nodejs.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-nodejs.md
index 9bd0dff069..f43fa82ae7 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-nodejs.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-nodejs.md
@@ -20,4 +20,3 @@ await session.streamExecuteScanQuery(`
```
{% include [error_handling.md](steps/50_error_handling.md) %}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-php.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-php.md
index 5da1e885b0..680ea66658 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-php.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-php.md
@@ -18,6 +18,7 @@ $config = [
];
$ydb = new Ydb($config);
+
```
App code snippet for creating a session:
@@ -31,4 +32,3 @@ $session = $table->session();
```
{% include [error_handling.md](steps/50_error_handling.md) %}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-python.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-python.md
index 80436ffc04..f4f305ec74 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-python.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/example-python.md
@@ -1,10 +1,10 @@
-# Приложение на Python
+# App in Python
-На этой странице подробно разбирается код [тестового приложения](https://github.com/yandex-cloud/ydb-python-sdk/tree/master/examples/basic_example_v1), доступного в составе [Python SDK](https://github.com/yandex-cloud/ydb-python-sdk) {{ ydb-short-name }}.
+This page contains a detailed description of the code of a [test app](https://github.com/yandex-cloud/ydb-python-sdk/tree/master/examples/basic_example_v1) that is available as part of the {{ ydb-short-name }} [Python SDK](https://github.com/yandex-cloud/ydb-python-sdk).
{% include [init.md](steps/01_init.md) %}
-Фрагмент кода приложения для инициализации драйвера:
+App code snippet for driver initialization:
```python
def run(endpoint, database, path):
@@ -22,7 +22,7 @@ def run(endpoint, database, path):
exit(1)
```
-Фрагмент кода приложения для создания сессии:
+App code snippet for creating a session:
```python
session = driver.table_client.session().create()
@@ -30,7 +30,7 @@ session = driver.table_client.session().create()
{% include [create_table.md](steps/02_create_table.md) %}
-Для создания таблиц используется метод `session.create_table()`:
+To create tables, use the `session.create_table()` method:
```python
def create_tables(session, path):
@@ -45,7 +45,7 @@ def create_tables(session, path):
)
```
-С помощью метода `session.describe_table()` можно вывести информацию о структуре таблицы и убедиться, что она успешно создалась:
+You can use the `session.describe_table()` method to output information about the table structure and make sure that it was properly created:
```python
def describe_table(session, path, name):
@@ -55,7 +55,7 @@ def describe_table(session, path, name):
print("column, name:", column.name, ",", str(column.type.item).strip())
```
-Приведенный фрагмент кода при запуске выводит на консоль текст:
+The given code snippet outputs the following text to the console at startup:
```bash
> describe table: series
@@ -69,10 +69,10 @@ def describe_table(session, path, name):
{% include [create_table.md](steps/03_query_processing.md) %}
-Для выполнения YQL-запросов используется метод `session.transaction().execute()`.
-SDK позволяет в явном виде контролировать выполнение транзакций и настраивать необходимый режим выполнения транзакций с помощью класса `TxControl`.
+To execute YQL queries, use the `session.transaction().execute()` method.
+The SDK lets you explicitly control the execution of transactions and configure the transaction execution mode using the `TxControl` class.
-В фрагменте кода, приведенном ниже, транзакция выполняется с помощью метода `transaction().execute()`. Устанавливается режим выполнения транзакции `ydb.SerializableReadWrite()`. После завершения всех запросов транзакции она будет автоматически завершена с помощью явного указания флага: `commit_tx=True`. Тело запроса описано с помощью синтаксиса YQL и как параметр передается методу `execute`.
+In the code snippet below, the transaction is executed using the `transaction().execute()` method. The transaction execution mode set is `ydb.SerializableReadWrite()`. When all the queries in the transaction are completed, the transaction is automatically committed by explicitly setting the flag: `commit_tx=True`. The query body is described using the YQL syntax and is passed to the `execute` method as a parameter.
```python
def select_simple(session, path):
@@ -98,7 +98,7 @@ def select_simple(session, path):
{% include [results_processing.md](steps/04_results_processing.md) %}
-В качестве результата выполнения запроса возвращается `result_set`:
+When the query is executed, `result_set` is returned:
```python
print("\n> select_simple_transaction:")
@@ -106,7 +106,7 @@ for row in result_sets[0].rows:
print("series, id: ", row.series_id, ", title: ", row.title, ", release date: ", row.release_date)
```
-Приведенный фрагмент кода при запуске выводит на консоль текст:
+The given code snippet outputs the following text to the console at startup:
```bash
> SelectSimple:
@@ -115,7 +115,7 @@ series, Id: 1, title: IT Crowd, Release date: 2006-02-03
{% include [write_queries.md](steps/05_write_queries.md) %}
-Фрагмент кода, демонстрирующий выполнение запроса на запись/изменение данных:
+Code snippet for inserting and updating data:
```python
def upsert_simple(session, path):
@@ -162,7 +162,7 @@ def select_prepared(session, path, series_id, season_id, episode_id):
return result_sets[0]
```
-Приведенный фрагмент кода при запуске выводит на консоль текст:
+The given code snippet outputs the following text to the console at startup:
```bash
> select_prepared_transaction:
@@ -192,7 +192,7 @@ def executeScanQuery(driver):
{% include [transaction_control.md](steps/10_transaction_control.md) %}
-Фрагмент кода, демонстрирующий явное использование вызовов `transaction().begin()` и `tx.Commit()`:
+Code snippet for `transaction().begin()` and `tx.Commit()` calls:
```python
def explicit_tcl(session, path, series_id, season_id, episode_id):
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/index.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/index.md
index 97836105d0..bea03512af 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/index.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/index.md
@@ -1,6 +1,6 @@
# Test app
-This section describes the code of test apps implemented using YDB SDKs in different programming languages.
+This section describes the code of test apps implemented using YDB SDK in different programming languages.
A test app performs the following steps:
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/01_init.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/01_init.md
index c7f868c18c..9e57dcbed3 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/01_init.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/01_init.md
@@ -5,4 +5,3 @@ To interact with {{ ydb-short-name }}, you have to create an instance of the dri
* The {{ ydb-short-name }} driver lets the app and {{ ydb-short-name }} interact at the transport layer. The driver must exist throughout the {{ ydb-short-name }} access lifecycle and be initialized before creating a client or session.
* The {{ ydb-short-name }} client runs on top of the {{ ydb-short-name }} driver and enables the handling of entities and transactions.
* The {{ ydb-short-name }} session contains information about executed transactions and prepared queries, and is part of the {{ ydb-short-name }} client context.
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/02_create_table.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/02_create_table.md
index 7b3226f9fb..d942a7982c 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/02_create_table.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/02_create_table.md
@@ -1,2 +1 @@
## Creating tables using the CreateTable API {#create-table-api}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/03_query_processing.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/03_query_processing.md
index 93886f1ac7..24107efeff 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/03_query_processing.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/03_query_processing.md
@@ -1,2 +1 @@
## Processing queries and transactions {#query-processing}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/04_results_processing.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/04_results_processing.md
index 760e27c6f3..ebe3e53b31 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/04_results_processing.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/04_results_processing.md
@@ -1,2 +1 @@
## Processing execution results {#results-processing}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/05_write_queries.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/05_write_queries.md
index c01f55b97b..02325e4da9 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/05_write_queries.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/05_write_queries.md
@@ -1,2 +1 @@
## Queries to insert or update data {#write-queries}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/06_param_queries.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/06_param_queries.md
index 214978ce79..7943721319 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/06_param_queries.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/06_param_queries.md
@@ -1,8 +1,7 @@
## Parameterized queries {#param-queries}
-{% note warning "Использование параметров в запросах" %}
+{% note warning %}
We strongly recommend that you use only parameterized queries. This lets your database prepare for parsing and optimization of multiple queries that differ only in parameter values just once.
{% endnote %}
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/07_param_prep_queries.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/07_param_prep_queries.md
index 4b2a1abeb5..fc04fcd5e8 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/07_param_prep_queries.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/07_param_prep_queries.md
@@ -3,4 +3,3 @@
Parameterized prepared queries are saved as templates where specially formatted names are replaced by relevant parameter values each time you execute the query. Use parameterized queries to improve performance by reducing how often queries that only differ in parameter values are compiled and recompiled. The prepared query is stored in the session context.
Code snippet for parameterized prepared queries:
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/08_scan_query.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/08_scan_query.md
index 96a6e6e04f..fc278a401a 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/08_scan_query.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/08_scan_query.md
@@ -1,4 +1,3 @@
## Scan queries {#scan-query}
The result of executing a [scan query](../../../../../concepts/scan_query.md) is a data stream. Below is an example of processing the query execution result.
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/09_multistep_transactions.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/09_multistep_transactions.md
index 9cca6eab02..bb19fd88a0 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/09_multistep_transactions.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/09_multistep_transactions.md
@@ -1,4 +1,3 @@
## Multi-step transactions with intermediate data processing on the client side {#multistep-transactions}
The code snippet below shows how to use multi-step transactions consisting of multiple queries. The client-side code can be run between query executions.
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/10_transaction_control.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/10_transaction_control.md
index 4021a3e389..b76306445b 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/10_transaction_control.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/10_transaction_control.md
@@ -1,4 +1,3 @@
## Explicit TCL Begin and Commit calls {#tcl-usage}
In most cases, instead of explicitly using the [TCL](../../../../../concepts/transactions.md) Begin and Commit calls, it's better to use transaction control parameters in the execute calls. This helps you avoid unnecessary requests to {{ ydb-short-name }} and run your queries more efficiently.
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/50_error_handling.md b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/50_error_handling.md
index 41c92f22a4..eb6c9370c3 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/50_error_handling.md
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/_includes/steps/50_error_handling.md
@@ -1,4 +1,3 @@
## Handling errors {#error-handling}
For more information about error handling, see [Error handling in the API](../../../error_handling.md).
-
diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/toc_i.yaml b/ydb/docs/en/core/reference/ydb-sdk/example/toc_i.yaml
index cbf42e5f35..54f8e4e338 100644
--- a/ydb/docs/en/core/reference/ydb-sdk/example/toc_i.yaml
+++ b/ydb/docs/en/core/reference/ydb-sdk/example/toc_i.yaml
@@ -4,7 +4,7 @@ items:
- name: C++
href: example-cpp.md
when: oss
-- name: C # (.NET)
+- name: C# (.NET)
href: example-dotnet.md
- name: Go
href: example-go.md
diff --git a/ydb/docs/en/core/toc_p.yaml b/ydb/docs/en/core/toc_p.yaml
index 1848d13d44..34abacb52e 100644
--- a/ydb/docs/en/core/toc_p.yaml
+++ b/ydb/docs/en/core/toc_p.yaml
@@ -1,5 +1,29 @@
title: Yandex Database
href: index.yaml
items:
-- include: { mode: link, path: toc_i.yaml }
+# Header
+- name: Contents
+ href: index.yaml
+- name: Getting started
+ items:
+ - name: Overview
+ href: getting_started/index.md
+ - include: { mode: link, path: getting_started/toc_i.yaml }
+
+# Main
+# - { name: Step-by-step instructions, include: { mode: link, path: solutions/toc_i.yaml }, when: audience == "external" }
+- { name: Concepts, include: { mode: link, path: concepts/toc_p.yaml } }
+- { name: Step-by-step instructions, include: { mode: link, path: operations/toc_p.yaml } }
+
+- { name: Recommendations, include: { mode: link, path: best_practices/toc_p.yaml } }
+- { name: Maintenance, include: { mode: link, path: maintenance/toc_p.yaml } }
+- { name: Diagnostics, include: { mode: link, path: troubleshooting/toc_p.yaml } }
+
+# References
+- { name: YQL, include: { mode: link, path: yql/toc_p.yaml } }
+- { name: Working with the YDB CLI, include: { mode: link, path: reference/ydb-cli/toc_p.yaml } }
+- { name: Working with the YDB SDK, include: { mode: link, path: reference/ydb-sdk/toc_p.yaml } }
+
+# Footer
+- { name: Questions and answers, include: { mode: link, path: faq/toc_p.yaml } }
diff --git a/ydb/docs/en/core/troubleshooting/_includes/monitoring_sensors.md b/ydb/docs/en/core/troubleshooting/_includes/monitoring_sensors.md
index f97374fb71..d5ce8b7052 100644
--- a/ydb/docs/en/core/troubleshooting/_includes/monitoring_sensors.md
+++ b/ydb/docs/en/core/troubleshooting/_includes/monitoring_sensors.md
@@ -86,4 +86,3 @@ You can analyze a transaction's execution time using a histogram counter. The in
| `table.query.compilation.cache_evictions`<br/>`RATE`, pieces | The number of queries evicted from the cache of [prepared queries](../oss/public/reference/ydb-sdk/#param-prepared-queries) in a certain period of time. |
| `table.query.compilation.cache_size_bytes`<br/>`IGAUGE`, bytes | The size of the cache of [prepared queries](../oss/public/reference/ydb-sdk/#param-prepared-queries). |
| `table.query.compilation.cached_query_count`<br/>`IGAUGE`, pieces | The size of the cache of [prepared queries](../oss/public/reference/ydb-sdk/#param-prepared-queries). |
-
diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions.md
index df3c85f771..c36f003299 100644
--- a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions.md
+++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions.md
@@ -3,4 +3,3 @@
Examples:
{% include [example_yql](partitions_example_yql.md) %}
-
diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_example_yql.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_example_yql.md
index bdeab3c498..e651429b28 100644
--- a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_example_yql.md
+++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_example_yql.md
@@ -1,5 +1,4 @@
-Top 5 of most loaded partitions among all DB tables
-
+ Top 5 of most loaded partitions among all DB tables
```sql
SELECT
Path,
@@ -11,7 +10,6 @@ Top 5 of most loaded partitions among all DB tables
```
List of DB tables with in-flight sizes and loads
-
```sql
SELECT
Path,
@@ -21,5 +19,4 @@ Top 5 of most loaded partitions among all DB tables
SUM(CPUCores) as CPU
FROM `/cluster/path/to/database/.sys/partition_stats`
GROUP BY Path
- ```
-
+ ``` \ No newline at end of file
diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_header.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_header.md
index 447571f4e1..4edb8c845c 100644
--- a/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_header.md
+++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/partitions_header.md
@@ -35,4 +35,3 @@ Table structure:
Restrictions:
* Cumulative fields (RowReads, RowUpdates, and so on) store the accumulated values since the last start of the tablet serving the partition
-
diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics.md
index e2fc18f715..049830f29b 100644
--- a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics.md
+++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics.md
@@ -2,5 +2,4 @@
Examples:
-{% include [example_yql](query_metrics_example_yql.md) %}
-
+{% include [example_yql](query_metrics_example_yql.md) %} \ No newline at end of file
diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_example_yql.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_example_yql.md
index f98134848a..2e622063c3 100644
--- a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_example_yql.md
+++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_example_yql.md
@@ -1,4 +1,4 @@
-Top 10 queries for the last 6 hours by the total number of rows updated per minute
+ Top 10 queries for the last 6 hours by the total number of rows updated per minute
```sql
SELECT
@@ -24,5 +24,4 @@ Top 10 queries for the last 6 hours by the total number of rows updated per minu
WHERE SumReadBytes > 0
ORDER BY IntervalEnd DESC, SumReadBytes DESC
LIMIT 100
- ```
-
+ ``` \ No newline at end of file
diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_header.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_header.md
index 69ee2da5f6..b74f360d20 100644
--- a/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_header.md
+++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/query_metrics_header.md
@@ -40,4 +40,3 @@ Restrictions:
* The table contains the history for the last 6 hours.
* Within the interval, information is provided for no more than 256 different queries.
* Statistics may be incomplete if the database is under heavy load.
-
diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops.md
index acb4488ba7..7c1cb50003 100644
--- a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops.md
+++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops.md
@@ -3,4 +3,3 @@
Examples:
{% include [example_yql.md](tops_example_yql.md) %}
-
diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_example_yql.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_example_yql.md
index 967f8bded5..b887e8ef37 100644
--- a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_example_yql.md
+++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_example_yql.md
@@ -1,4 +1,4 @@
-Top queries by execution time for the last minute when queries were made
+ Top queries by execution time for the last minute when queries were made
```sql
$last = (
@@ -26,5 +26,4 @@ Top queries by execution time for the last minute when queries were made
Partitions
FROM `/cluster/path/to/database/.sys/top_queries_by_read_bytes_one_minute`
WHERE Rank = 1
- ```
-
+ ``` \ No newline at end of file
diff --git a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_header.md b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_header.md
index 2d2249a66c..cdff4f948d 100644
--- a/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_header.md
+++ b/ydb/docs/en/core/troubleshooting/_includes/system_views/tops_header.md
@@ -50,4 +50,3 @@ Restrictions:
* Query text limit is 4 KB.
* Tables with minute intervals contain the history for the last 6 hours.
* Tables with hourly intervals contain the history for the last 2 weeks.
-
diff --git a/ydb/docs/en/core/troubleshooting/monitoring.md b/ydb/docs/en/core/troubleshooting/monitoring.md
index 598b0fed12..a181d1d03e 100644
--- a/ydb/docs/en/core/troubleshooting/monitoring.md
+++ b/ydb/docs/en/core/troubleshooting/monitoring.md
@@ -1,7 +1,7 @@
---
editable: false
---
+
# Metric reference
{% include notitle [ydb_monitoring_sensors.md](_includes/monitoring_sensors.md) %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/_includes/cast_examples.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/_includes/cast_examples.md
index 467901871f..688e7712eb 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/_includes/cast_examples.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/_includes/cast_examples.md
@@ -6,9 +6,9 @@ SELECT
CAST("xyz" AS Uint64) IS NULL, -- true, because it failed
CAST(-1 AS Uint16) IS NULL, -- true, a negative integer cast to an unsigned integer
CAST([-1, 0, 1] AS List<Uint8?>), -- [null, 0, 1]
- --The item type is optional: the failed item is cast to null.
+ --The element type is optional: the failed element is cast to null.
CAST(["3.14", "bad", "42"] AS List<Float>), -- [3.14, 42]
- --The item type is not optional: the failed item has been deleted.
+ --The element type is not optional: the failed element has been deleted.
CAST(255 AS Uint8), -- 255
CAST(256 AS Uint8) IS NULL -- true, out of range
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/agg_list.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/agg_list.md
index 8503de522a..717dcd8311 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/agg_list.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/agg_list.md
@@ -2,11 +2,11 @@
Get all column values as a list. When combined with `DISTINCT`, it returns only distinct values. The optional second parameter sets the maximum number of values to be returned.
-If you know already that you have few distinct values, use the`AGGREGATE_LIST_DISTINCT` aggregate function to build the same result in memory (that might not be enough for a large number of distinct values).
+If you know already that you have few distinct values, use the `AGGREGATE_LIST_DISTINCT` aggregate function to build the same result in memory (that might not be enough for a large number of distinct values).
The order of elements in the result list depends on the implementation and can't be set externally. To return an ordered list, sort the result, for example, with [ListSort](../../list.md#listsort).
-To return a list of multiple values from one line, *DO NOT* use the `AGGREGATE_LIST` function several times, but add all the needed values to a container, for example, via [AsList](../../basic.md#aslist) or [AsTuple](../../basic.md#astuple), then pass this container to a single `AGGREGATE_LIST` call.
+To return a list of multiple values from one line, *DO NOT* use the `AGGREGATE_LIST` function several times, but add all the needed values to a container, for example, via [AsList](../../basic.md#aslist) or [AsTuple](../../basic.md#astuple), then pass this container to a single `AGGREGATE_LIST` call.
For example, you can combine it with `DISTINCT` and the function [String::JoinFromList](../../../udf/list/string.md) (it's an equivalent of `','.join(list)` in Python) to output to a string all the values found in the column after [GROUP BY](../../../syntax/group_by.md).
@@ -33,7 +33,7 @@ These functions also have a short notation: `AGG_LIST` and `AGG_LIST_DISTINCT`.
{% note alert %}
-Execution is **NOT** lazy, so when you use it, be sure that the list has a reasonable size (about a thousand items or less). To stay on the safe side, better use a second optional numeric argument that limits the number of items in the list.
+Execution is **NOT** lazy, so when you use it, be sure that the list has a reasonable size (about a thousand elements or less). To stay on the safe side, better use a second optional numeric argument that limits the number of items in the list.
{% endnote %}
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/histogram.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/histogram.md
index f10ba39535..a2ea97b8dc 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/histogram.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/histogram.md
@@ -95,7 +95,7 @@ SELECT
FROM my_table;
```
-## LinearHistogram, LogarithmicHistogram and LogHistogram {#linearhistogram
+LinearHistogram, LogarithmicHistogram and LogHistogram {#linearhistogram}
Plotting a histogram based on an explicitly specified fixed bucket scale.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/max_min_by.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/max_min_by.md
index 005f9953af..a858dc03b5 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/max_min_by.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/max_min_by.md
@@ -11,7 +11,7 @@ When choosing N, we recommend that you don't exceed several hundreds or thousand
If your task needs absolutely all values, and their number is measured in dozens of thousands or more, then instead of those aggregate functions better use `JOIN` on the source table with a subquery doing `GROUP BY + MIN/MAX` on the desired columns of this table.
-{% note warning "Внимание" %}
+{% note warning "Attention" %}
If the second argument is always NULL, the aggregation result is NULL.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/percentile_median.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/percentile_median.md
index ba1ecf6f16..f098eb6cc1 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/percentile_median.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/percentile_median.md
@@ -2,7 +2,7 @@
Calculating percentiles using the amortized version of the [TDigest](https://github.com/tdunning/t-digest) algorithm. `MEDIAN`: An alias for `PERCENTILE(N, 0.5)`.
-{% note info "Ограничение" %}
+{% note info "Restriction" %}
The first argument (N) must be a table column name. If you need to bypass this restriction, use a subquery. The restriction is introduced to simplify calculations, since the implementation merges the calls with the same first argument (N) into a single pass.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/session_start.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/session_start.md
index 62e1db4f2a..1832102f6f 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/session_start.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/session_start.md
@@ -1,6 +1,8 @@
## SessionStart {#session-start}
-No arguments. It's allowed only if there is [SessionWindow](../../../syntax/group_by.md#session-window) in [GROUP BY](../../../syntax/group_by.md) / [PARTITION BY](../../../syntax/window.md#partition).
+No arguments. It's allowed only if there is [SessionWindow](../../../syntax/group_by.md#session-window) in
+[GROUP BY](../../../syntax/group_by.md) / [PARTITION BY](../../../syntax/window.md#partition).
Returns the value of the `SessionWindow` key column. If `SessionWindow` has two arguments, it returns the minimum value of the first argument within the group/section.
+
In the case of the expanded version `SessionWindow`, it returns the value of the second element from the tuple returned by `<calculate_lambda>`, for which the first tuple element is `True`.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/top_bottom.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/top_bottom.md
index 8a80dc8ac7..75f6ac83cd 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/top_bottom.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/aggregation/top_bottom.md
@@ -1,6 +1,6 @@
## TOP and BOTTOM {#top-bottom}
-Return a list of the maximum/minimum values of an expression. The first argument is an expression, the second argument limits the number of items.
+Return a list of the maximum/minimum values of an expression. The first argument is an expression, the second argument limits the number of elements.
**Examples**
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/abs.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/abs.md
index 1c563cba95..39842a9ea7 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/abs.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/abs.md
@@ -3,8 +3,6 @@
The absolute value of the number.
**Examples**
-
-```yql
+``` yql
SELECT Abs(-123); -- 123
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/aggr_factory.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/aggr_factory.md
index b6721b8043..b861aaecd3 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/aggr_factory.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/aggr_factory.md
@@ -7,13 +7,11 @@ Arguments:
1. A string in double quotes with the name of an aggregate function, for example ["MIN"](../../aggregation.md#min).
2. Optional parameters of the aggregate function that are data-independent. For example, the percentile value in [PERCENTILE](../../aggregation.md#percentile).
-The resulting factory can be used as the second parameter of the function [AGGREGATE_BY](..
-/../aggregation.md#aggregateby).
+The resulting factory can be used as the second parameter of the function [AGGREGATE_BY](../../aggregation.md#aggregateby).
If the aggregate function is applied to two columns instead of one, as, for example, [MIN_BY](../../aggregation.md#minby), then in [AGGREGATE_BY](../../aggregation.md#aggregateby), the first argument passes a `Tuple` of two values. See more details in the description of the applicable aggregate function.
**Examples:**
-
-```yql
+``` yql
$factory = AggregationFactory("MIN");
SELECT
AGGREGATE_BY (value, $factory) AS min_value -- apply the MIN aggregation to the "value" column
@@ -22,16 +20,15 @@ FROM my_table;
## AggregateTransform... {#aggregatetransform}
-`AggregateTransformInput()` converts an [aggregation factory](../../aggregation.md), for example, obtained using the [AggregationFactory](#aggregationfactory) function, to other factory, in which the specified transformation of input items is performed before starting aggregation.
+`AggregateTransformInput()` converts an [aggregation factory](../../aggregation.md), for example, obtained using the [AggregationFactory](#aggregationfactory) function, to other factory, in which the specified transformation of input elements is performed before starting aggregation.
Arguments:
1. Aggregation factory.
-2. A lambda function with one argument that converts an input item.
+2. A lambda function with one argument that converts an input element.
**Examples:**
-
-```yql
+``` yql
$f = AggregationFactory("sum");
$g = AggregateTransformInput($f, ($x) -> (cast($x as Int32)));
$h = AggregateTransformInput($f, ($x) -> ($x * 2));
@@ -48,8 +45,7 @@ Arguments:
2. A lambda function with one argument that converts the result.
**Examples:**
-
-```yql
+``` yql
$f = AggregationFactory("sum");
$g = AggregateTransformOutput($f, ($x) -> ($x * 2));
select ListAggregate([1,2,3], $f); -- 6
@@ -58,15 +54,14 @@ select ListAggregate([1,2,3], $g); -- 12
## AggregateFlatten {#aggregateflatten}
-Adapts a factory for [aggregation functions](../../aggregation.md), for example, obtained using the [AggregationFactory](#aggregationfactory) function in a way that allows aggregation of list input items. This operation is similar to [FLATTEN LIST BY](../../../syntax/flatten.md): Each list item is aggregated.
+Adapts a factory for [aggregation functions](../../aggregation.md), for example, obtained using the [AggregationFactory](#aggregationfactory) function in a way that allows aggregation of list input elements. This operation is similar to [FLATTEN LIST BY](../../../syntax/flatten.md): Each list element is aggregated.
Arguments:
1. Aggregation factory.
**Examples:**
-
-```yql
+``` yql
$i = AggregationFactory("AGGREGATE_LIST_DISTINCT");
$j = AggregateFlatten($i);
select AggregateBy(x, $j) from (
@@ -74,5 +69,5 @@ select AggregateBy(x, $j) from (
union all
select [2,3] as x
); -- [1, 2, 3]
-```
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_container.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_container.md
index 15adedeeda..7c2126c4df 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_container.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_container.md
@@ -8,7 +8,7 @@ Specifics:
* `AsTuple` and `AsStruct` can be called without arguments, and also the arguments can have different types.
* The field names in `AsStruct` are set using `AsStruct(field_value AS field_name)`.
* Creating a list requires at least one argument if you need to output the element types. To create an empty list with the given type of elements, use the function [ListCreate](../../list.md#listcreate). You can create an empty list as an `AsList()` call without arguments. In this case, this expression will have the `EmptyList` type.
-* Creating a dictionary requires at least one argument if you need to output the element types. To create an empty dictionary with the given type of elements, use the function [DictCreate](../../dict.md#dictcreate). You can create an empty dictionary as an `AsDict()` call without arguments, in this case, this expression will have the `EmptyDict` type.
+* Creating a dictionary requires at least one argument if you need to output element types. To create an empty dictionary with the given type of elements, use the function [DictCreate](../../dict.md#dictcreate). You can create an empty dictionary as an `AsDict()` call without arguments, in this case, this expression will have the `EmptyDict` type.
* Creating a set requires at least one argument if you need to output element types. To create an empty set with the given type of elements, use the function [SetCreate](../../dict.md#setcreate). You can create an empty set as an `AsSet()` call without arguments, in this case, this expression will have the `EmptySet` type.
* `AsList` outputs the common type of elements in the list. A type error is raised in the case of incompatible types.
* `AsDict` separately outputs the common types for keys and values. A type error is raised in the case of incompatible types.
@@ -18,8 +18,7 @@ Specifics:
* `AsSet` and `AsSetStrict` expect keys as arguments.
**Examples**
-
-```yql
+``` yql
SELECT
AsTuple(1, 2, "3") AS `tuple`,
AsStruct(
@@ -35,4 +34,3 @@ SELECT
) AS `dict`,
AsSet(1, 2, 3) AS `set`
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_tagged.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_tagged.md
index 326cdb9812..981395a06c 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_tagged.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/as_tagged.md
@@ -1,6 +1,6 @@
## AsTagged, Untag {#as-tagged}
-Wraps the value in the [Tagged data type](../../../types/special.md) with the specified tag, preserving the physical data type. `Untag`: The reverse operation.
+Wraps the value in the [Tagged data type](../../../types/special.md) with the specified tag, preserving the physical data type. `Untag`: the reverse operation.
Required arguments:
@@ -14,4 +14,3 @@ Examples of use cases:
* Returns to the client's web interface the media files from BASE64-encoded strings{% if feature_webui %}. Tag support in the YQL Web UI [is described here](../../../interfaces/web_tagged.md){% endif %}.
{% if feature_mapreduce %}* Prevent passing of invalid values at the boundaries of UDF calls.{% endif %}
* Additional refinements at the level of returned columns types.
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/bitops.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/bitops.md
index 2ecf0818d4..e2c5b33134 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/bitops.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/bitops.md
@@ -10,10 +10,8 @@ Arguments:
TestBit returns `true/false`. The other functions return a copy of their first argument with the corresponding conversion.
**Examples:**
-
-```yql
+``` yql
SELECT
TestBit(1u, 0), -- true
SetBit(8u, 0); -- 9
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/byteat.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/byteat.md
index ef9c9d0bde..1964874931 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/byteat.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/byteat.md
@@ -8,11 +8,9 @@ Arguments:
2. Index: `Uint32`.
**Examples**
-
-```yql
+``` yql
SELECT
ByteAt("foo", 0), -- 102
ByteAt("foo", 1), -- 111
ByteAt("foo", 9); -- NULL
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/callable.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/callable.md
index 30cd21dffb..25df4c1be5 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/callable.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/callable.md
@@ -8,8 +8,7 @@ Arguments:
2. Lambda function.
**Examples:**
-
-```yql
+``` yql
$lambda = ($x) -> {
RETURN CAST($x as String)
};
@@ -21,4 +20,3 @@ $callables = AsTuple(
SELECT $callables.0(10), $callables.1(true);
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/coalesce.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/coalesce.md
index 09fe299a60..7da96d2271 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/coalesce.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/coalesce.md
@@ -7,8 +7,7 @@ Lets you pass potentially empty values to functions that can't handle them by th
A short format using the low-priority `??` operator is available (lower than the Boolean operations). You can use the `NVL` alias.
**Examples**
-
-```yql
+``` yql
SELECT COALESCE(
maybe_empty_column,
"it's empty!"
@@ -28,5 +27,4 @@ SELECT NVL(
) FROM my_table;
```
-<span style="color: gray;">(all three examples above are equivalent)</span>
-
+<span style="color: gray;">(all three examples above are equivalent)</span> \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/container_literal.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/container_literal.md
index 9ea09391d6..2a90f1650d 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/container_literal.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/container_literal.md
@@ -14,8 +14,7 @@ For field names in the structure literal, you can use an expression that can be
For nested lists, use [AsList](#aslist), for nested dictionaries, use [AsDict](#asdict), for nested sets, use [AsSet](#asset), for nested tuples, use [AsTuple](#astuple), for nested structures, use [AsStruct](#asstruct).
**Examples**
-
-```yql
+``` yql
$name = "computed " || "member name";
SELECT
(1, 2, "3") AS `tuple`,
@@ -33,4 +32,3 @@ SELECT
} AS `dict`,
{1, 2, 3} AS `set`
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_tz.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_tz.md
index 7116a94596..75c934c7b6 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_tz.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_tz.md
@@ -5,12 +5,10 @@
The arguments that follow are optional and work same as [RANDOM](#random).
**Examples**
-
-```yql
+``` yql
SELECT CurrentTzDate("Europe/Moscow");
```
-
-```yql
+``` yql
SELECT CurrentTzTimestamp("Europe/Moscow", TableRow()) FROM my_table;
```
@@ -26,8 +24,7 @@ Arguments:
Result type: `TzDate`/`TzDatetime`/`TzTimestamp`, depending on the input data type.
**Examples**
-
-```yql
+``` yql
SELECT AddTimezone(Datetime("2018-02-01T12:00:00Z"), "Europe/Moscow");
```
@@ -42,8 +39,6 @@ Arguments:
Result type: `Date`/`Datetime`/`Timestamp`, depending on the input data type.
**Examples**
-
-```yql
+``` yql
SELECT RemoveTimezone(TzDatetime("2018-02-01T12:00:00,Europe/Moscow"));
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_utc.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_utc.md
index 36bb5eeb02..8eff367299 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_utc.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/current_utc.md
@@ -1,16 +1,13 @@
## CurrentUtc... {#current-utc}
-`CurrentUtcDate()`, `CurrentUtcDatetime()` and `CurrentUtcTimestamp()`: Getting the current date and/or time in UTC. The result data type is specified at the end of the function name.
+`CurrentUtcDate()`, `CurrentUtcDatetime()` and `CurrentUtcTimestamp()`: getting the current date and/or time in UTC. The result data type is specified at the end of the function name.
The arguments are optional and work same as [RANDOM](#random).
**Examples**
-
-```yql
+``` yql
SELECT CurrentUtcDate();
```
-
-```yql
+``` yql
SELECT CurrentUtcTimestamp(TableRow()) FROM my_table;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/data-type-literals.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/data-type-literals.md
index 079656d5a0..f123dd7c15 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/data-type-literals.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/data-type-literals.md
@@ -4,7 +4,7 @@ For primitive types, you can create literals based on string literals.
**Syntax**
-<Primitive type>(<string>[, <дополнительные атрибуты>])
+<Primitive type>(<string>[, <additional attributes>])
Unlike `CAST("myString" AS MyType)`:
@@ -23,8 +23,7 @@ For the data types `TzDate`, `TzDatetime`, `TzTimestamp`, literals are also set
{% include [decimal args](../../../_includes/decimal_args.md) %}
**Examples**
-
-```yql
+``` yql
SELECT
Bool("true"),
Uint8("0"),
@@ -47,5 +46,4 @@ SELECT
TzDatetime("2017-11-27T13:24:00,America/Los_Angeles"),
TzTimestamp("2017-11-27T13:24:00.123456,GMT"),
Uuid("f9d5cc3f-f1dc-4d9c-b97e-766e57ca4ccb");
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/ensure.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/ensure.md
index d2509df357..9a47d5b546 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/ensure.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/ensure.md
@@ -17,8 +17,7 @@ Arguments:
To check the conditions based on the final calculation result, it's convenient to combine Ensure with [DISCARD SELECT](../../../syntax/discard.md).
**Examples**
-
-```yql
+``` yql
SELECT Ensure(
value,
value < 100,
@@ -26,7 +25,7 @@ SELECT Ensure(
) AS value FROM my_table;
```
-```yql
+``` yql
SELECT EnsureType(
value,
TypeOf(other_value),
@@ -34,11 +33,10 @@ SELECT EnsureType(
) AS value FROM my_table;
```
-```yql
+``` yql
SELECT EnsureConvertibleTo(
value,
Double?,
"expected value to be numeric"
) AS value FROM my_table;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/enum.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/enum.md
index 28729c4441..f30225d2e9 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/enum.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/enum.md
@@ -8,8 +8,7 @@ Arguments:
* Enumeration type
**Example**
-
-```yql
+``` yql
$enum_type = Enum<Foo, Bar>;
SELECT
Enum("Foo", $enum_type) as Enum1Value,
@@ -20,12 +19,10 @@ SELECT
Arguments:
-* A string with the name of an enumeration item
+* A string with the name of an enumeration element
**Example**
-
-```yql
+``` yql
SELECT
AsEnum("Foo");
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/evaluate_expr_atom.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/evaluate_expr_atom.md
index 096709330d..22a5bd1c78 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/evaluate_expr_atom.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/evaluate_expr_atom.md
@@ -17,12 +17,10 @@ Restrictions:
* This functionality is fully locked in YQL over YDB.
**Examples:**
-
-```yql
+``` yql
$now = CurrentUtcDate();
SELECT EvaluateExpr(
DateTime::MakeDate(DateTime::StartOfWeek($now)
)
);
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/files.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/files.md
index ddf83e3836..e802a21663 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/files.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/files.md
@@ -5,14 +5,12 @@ Both the [console](../../../interfaces/cli.md) and [web](../../../interfaces/web
The `FileContent` and `FilePath` argument is a string with an alias.
**Examples**
-
-```yql
+``` yql
SELECT "Content of "
|| FilePath("my_file.txt")
|| ":\n"
|| FileContent("my_file.txt");
```
-
## FolderPath {#folderpath}
Getting the path to the root of a directory with several "attached" files with the common prefix specified.
@@ -22,8 +20,7 @@ The argument is a string with a prefix among aliases.
See also [PRAGMA File](../../../syntax/pragma.md#file) and [PRAGMA Folder](../../../syntax/pragma.md#folder).
**Examples**
-
-```yql
+``` yql
PRAGMA File("foo/1.txt", "http://url/to/somewhere");
PRAGMA File("foo/2.txt", "http://url/to/somewhere/else");
PRAGMA File("bar/3.txt", "http://url/to/some/other/place");
@@ -43,20 +40,17 @@ Two required arguments:
1. List cell type: only strings and numeric types are supported.
2. The name of the attached file.
-{% note info "Примечание" %}
+{% note info %}
The return value is a lazy list. For repeat use, wrap it in the function [ListCollect](../../list.md#listcollect)
{% endnote %}
**Examples:**
-
-```yql
+``` yql
SELECT ListLength(ParseFile("String", "my_file.txt"));
```
-
-```yql
+``` yql
SELECT * FROM my_table
WHERE int_column IN ParseFile("Int64", "my_file.txt"));
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/find.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/find.md
index 80fecee7ab..436cd710f9 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/find.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/find.md
@@ -14,16 +14,13 @@ Optional arguments:
Returns the first substring position found or `NULL` (meaning that the desired substring hasn't been found starting from the specified position).
**Examples**
-
-```yql
+``` yql
SELECT FIND("abcdefg_abcdefg", "abc"); -- 0
```
-
-```yql
+``` yql
SELECT FIND("abcdefg_abcdefg", "abc", 1); -- 8
```
-
-```yql
+``` yql
SELECT FIND("abcdefg_abcdefg", "abc", 9); -- null
```
@@ -43,16 +40,12 @@ Optional arguments:
Returns the first substring position found or `NULL` (meaning that the desired substring hasn't been found starting from the specified position).
**Examples**
-
-```yql
+``` yql
SELECT RFIND("abcdefg_abcdefg", "bcd"); -- 9
```
-
-```yql
+``` yql
SELECT RFIND("abcdefg_abcdefg", "bcd", 8); -- 1
```
-
-```yql
+``` yql
SELECT RFIND("abcdefg_abcdefg", "bcd", 0); -- null
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/if.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/if.md
index dcd486afac..3bc844b1be 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/if.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/if.md
@@ -7,11 +7,9 @@ It's a simplified alternative for [CASE WHEN ... THEN ... ELSE ... END](../../..
You may omit the `else_expression` argument. In this case, if the condition is false (`condition_expression` returned `false`), an empty value is returned with the type corresponding to `then_expression` and allowing for `NULL`. Hence, the result will have an [optional data type](../../../types/optional.md).
**Examples**
-
-```yql
+``` yql
SELECT
IF(foo > 0, bar, baz) AS bar_or_baz,
IF(foo > 0, foo) AS only_positive_foo
FROM my_table;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/intro.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/intro.md
index d8da1aff4f..27b4b0e8c6 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/intro.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/intro.md
@@ -1,4 +1,3 @@
# Basic built-in functions
-Below are the general-purpose functions. For specialized functions, there are separate articles: [aggregate functions](../../aggregation.md){% if feature_window_functions %}, [window functions](../../window.md){% endif %}, and functions for [lists](../../list.md), [dictionaries](../../dict.md), [structures](../../struct.md), [data types](../../types.md){% if feature_codegen %}, and [code generation](../../codegen.md){% endif %}.
-
+Below are the general-purpose functions. For specialized functions, see separate articles: [aggregate functions](../../aggregation.md){% if feature_window_functions %}, [window functions](../../window.md){% endif %}, and functions for [lists](../../list.md), [dictionaries](../../dict.md), [structures](../../struct.md), [data types](../../types.md){% if feature_codegen %}, and [code generation](../../codegen.md){% endif %}.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/length.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/length.md
index 4dc75910f9..ac3cb2cf7a 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/length.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/length.md
@@ -3,12 +3,10 @@
Returns the length of the string in bytes. This function is also available under the `LEN` name .
**Examples**
-
-```yql
+``` yql
SELECT LENGTH("foo");
```
-
-```yql
+``` yql
SELECT LEN("bar");
```
@@ -17,4 +15,3 @@ SELECT LEN("bar");
To calculate the length of a string in Unicode characters, you can use the function [Unicode::GetLength](../../../udf/list/unicode.md).<br><br>To get the number of elements in the list, use the function [ListLength](../../list.md#listlength).
{% endnote %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/max_min.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/max_min.md
index d4f4afa916..22a5c00e70 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/max_min.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/max_min.md
@@ -7,8 +7,6 @@ The argument types must be mutually castable and accept `NULL`.
`GREATEST` is a synonym for `MAX_OF` and `LEAST` is a synonym for `MIN_OF`.
**Examples**
-
-```yql
+``` yql
SELECT MIN_OF(1, 2, 3);
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/metadata.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/metadata.md
index 610f9bb0f2..1bfc9ae23b 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/metadata.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/metadata.md
@@ -11,11 +11,9 @@ No arguments.
If this data is missing, for example, when you run operations in the embedded mode, the functions return an empty string.
**Examples**
-
-```yql
+``` yql
SELECT
CurrentOperationId(),
CurrentOperationSharedId(),
CurrentAuthenticatedUser();
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/nanvl.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/nanvl.md
index dc9b16d1b3..6bdffcb6b8 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/nanvl.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/nanvl.md
@@ -10,10 +10,8 @@ Arguments:
If one of the arguments is `Double`, the result is`Double`, otherwise, it's `Float`. If one of the arguments is `Optional`, then the result is `Optional`.
**Examples**
-
-```yql
+``` yql
SELECT
NANVL(double_column, 0.0)
FROM my_table;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/optional_ops.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/optional_ops.md
index d0bc08c13e..6e8526f422 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/optional_ops.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/optional_ops.md
@@ -5,8 +5,7 @@
The reverse operation is [Unwrap](#unwrap).
**Examples**
-
-```yql
+``` yql
SELECT
Just("my_string"); -- String?
```
@@ -23,8 +22,7 @@ Arguments:
Reverse operation is [Just](#just).
**Examples**
-
-```yql
+``` yql
$value = Just("value");
SELECT Unwrap($value, "Unexpected NULL for $value");
@@ -33,11 +31,9 @@ SELECT Unwrap($value, "Unexpected NULL for $value");
`Nothing()`: Create an empty value for the specified [Optional](../../../types/optional.md) data type.
**Examples**
-
-```yql
+``` yql
SELECT
Nothing(String?); -- an empty (NULL) value with the String? type
```
-[Learn more about ParseType and other functions for data types](../../types.md).
-
+[Learn more about ParseType and other functions for data types](../../types.md). \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/pickle.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/pickle.md
index 1a852f530a..50432dd22c 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/pickle.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/pickle.md
@@ -5,8 +5,7 @@
`Unpickle()` is the inverse operation (deserialization), where with the first argument being the data type of the result and the second argument is the string with the result of `Pickle()` or `StablePickle()`.
Examples:
-
-```yql
+``` yql
SELECT *
FROM my_table
WHERE Digest::MurMurHash32(
@@ -16,4 +15,3 @@ WHERE Digest::MurMurHash32(
$buf = Pickle(123);
SELECT Unpickle(Int32, $buf);
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/random.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/random.md
index 1722cc6c9c..b3e2d6e40c 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/random.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/random.md
@@ -21,26 +21,25 @@ Use cases:
* `SELECT RANDOM(some_column), RANDOM(some_column + 1) FROM table;` or `SELECT RANDOM(some_column), RANDOM(other_column) FROM table;`: Two columns, with different numbers in both.
**Examples**
-
-```yql
+``` yql
SELECT
Random(key) -- [0, 1)
FROM my_table;
```
-```yql
+``` yql
SELECT
RandomNumber(key) -- [0, Max<Uint64>)
FROM my_table;
```
-```yql
+``` yql
SELECT
RandomUuid(key) -- Uuid version 4
FROM my_table;
```
-```yql
+``` yql
SELECT
RANDOM(column) AS rand1,
RANDOM(column) AS rand2, -- same as rand1
@@ -48,4 +47,3 @@ SELECT
RANDOM(column, 2) AS randAnd2 -- different from randAnd1
FROM my_table;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/starts_ends_with.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/starts_ends_with.md
index 5a0de652b4..483ffa429c 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/starts_ends_with.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/starts_ends_with.md
@@ -10,20 +10,15 @@ Required arguments:
The arguments can be of the `String` or `Utf8` type and can be optional.
**Examples**
-
-```yql
+``` yql
SELECT StartsWith("abc_efg", "abc") AND EndsWith("abc_efg", "efg"); -- true
```
-
-```yql
+``` yql
SELECT StartsWith("abc_efg", "efg") OR EndsWith("abc_efg", "abc"); -- false
```
-
-```yql
+``` yql
SELECT StartsWith("abcd", NULL); -- null
```
-
-```yql
+``` yql
SELECT EndsWith(NULL, Utf8("")); -- null
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticmap.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticmap.md
index 6bb7b716ee..347db0f105 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticmap.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/staticmap.md
@@ -1,17 +1,16 @@
## StaticMap
-Transforms a structure or tuple by applying a lambda function to each item.
+Transforms a structure or tuple by applying a lambda function to each element.
Arguments:
* Structure or tuple.
-* Lambda for processing items.
+* Lambda for processing elements.
-Result: a structure or tuple with the same number and naming of items as in the first argument, and with item data types determined by lambda results.
+Result: a structure or tuple with the same number and naming of elements as in the first argument, and with element data types determined by lambda results.
**Examples:**
-
-```yql
+``` yql
SELECT *
FROM (
SELECT
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/substring.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/substring.md
index 78f533ed6f..c07157c0af 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/substring.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/substring.md
@@ -11,20 +11,16 @@ Optional arguments:
* Substring length: The number of bytes starting from the specified position (an integer, or the default `NULL` meaning "up to the end of the source string").
-Indexing starts from zero. If the specified position and length are beyond the string, returns an empty string.
+Indexing starts from zero. If the specified position and length are beyond the string, it returns an empty string.
If the input string is optional, the result is also optional.
**Examples**
-
-```yql
+``` yql
SELECT SUBSTRING("abcdefg", 3, 1); -- d
```
-
-```yql
+``` yql
SELECT SUBSTRING("abcdefg", 3); -- defg
```
-
-```yql
+``` yql
SELECT SUBSTRING("abcdefg", NULL, 3); -- abc
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_path_name_recindex.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_path_name_recindex.md
index 8f41c97d5b..d7f71ddfe3 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_path_name_recindex.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_path_name_recindex.md
@@ -4,21 +4,20 @@ Access to the current table name, which might be needed when you use [CONCAT](..
No arguments. Returns a string with the full path or an empty string and warning when used in an unsupported context (for example, when working with a subquery or a range of 1000+ tables).
-{% note info "Примечание" %}
+{% note info %}
-The [TablePath](#tablepath), [TableName](#tablename), and [TableRecordIndex](#tablerecordindex) functions don't support temporary and anonymous tables (they return an empty string or 0 for [TableRecordIndex](#tablerecordindex)).
+The functions [TablePath](#tablepath), [TableName](#tablename), and [TableRecordIndex](#tablerecordindex) don't support temporary and anonymous tables (they return an empty row or 0 for [TableRecordIndex](#tablerecordindex)).
These functions are calculated when [executing](../../../syntax/select.md#selectexec) projections in `SELECT`, and by that time the current table may already be temporary.
To avoid such a situation, create a subquery for calculating these functions, as shown in the second example below.
{% endnote %}
**Examples**
-
-```yql
+``` yql
SELECT TablePath() FROM CONCAT(table_a, table_b);
```
-```yql
+``` yql
SELECT key, tpath_ AS path FROM (SELECT a.*, TablePath() AS tpath_ FROM RANGE(`my_folder`) AS a)
WHERE key IN $subquery;
```
@@ -33,13 +32,12 @@ Optional arguments:
* Specifying the system ("yt") whose rules are used to determine the table name. You need to specify the system only if [USE](../../../syntax/select.md#use) doesn't specify the current cluster.
**Examples**
-
-```yql
+``` yql
USE hahn;
SELECT TableName() FROM CONCAT(table_a, table_b);
```
-```yql
+``` yql
SELECT TableName(Path, "yt") FROM hahn.FOLDER(folder_name);
```
@@ -50,8 +48,6 @@ Access to the current sequence number of a row in the physical source table, **s
No arguments. When used in combination with [CONCAT](../../../syntax/select.md#concat), [RANGE](../../../syntax/select.md#range) and other similar mechanisms, numbering restarts for each input table. If used in an incorrect context, it returns 0.
**Example**
-
-```yql
+``` yql
SELECT TableRecordIndex() FROM my_table;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_row.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_row.md
index f6cedf2bf8..9abb22feaf 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_row.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/table_row.md
@@ -3,8 +3,6 @@
Getting the entire table row as a structure. No arguments{% if feature_join %}. `JoinTableRow` in case of `JOIN` always returns a structure with table prefixes{% endif %}.
**Example**
-
-```yql
+``` yql
SELECT TableRow() FROM my_table;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/to_from_bytes.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/to_from_bytes.md
index 75105178eb..2992859f12 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/to_from_bytes.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/to_from_bytes.md
@@ -3,8 +3,7 @@
Conversion of [primitive data types](../../../types/primitive.md) to a string with their binary representation and back. Numbers are represented in the [little endian](https://en.wikipedia.org/wiki/Endianness#Little-endian) format.
**Examples**
-
-```yql
+``` yql
SELECT
ToBytes(123), -- "\u0001\u0000\u0000\u0000"
FromBytes(
@@ -12,4 +11,3 @@ SELECT
Uint64
); -- 1234567890ul
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/variant.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/variant.md
index 7854ae7db0..84fa060875 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/variant.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/variant.md
@@ -9,8 +9,7 @@ Arguments:
* Variant type
**Example**
-
-```yql
+``` yql
$var_type = Variant<foo: Int32, bar: Bool>;
SELECT
@@ -26,8 +25,7 @@ Arguments:
* A string with the field name
**Example**
-
-```yql
+``` yql
SELECT
AsVariant(6, "foo") as VariantValue
```
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/weakfield.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/weakfield.md
index e8a60bd796..499e422e37 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/weakfield.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/basic/weakfield.md
@@ -7,11 +7,9 @@ Syntax: `WeakField([<table>.]<field>, <type>[, <default_value>])`.
The default value is used only if the column is missing in the data schema. To use the default value in any case, use [COALESCE](#coalesce).
**Examples:**
-
-```yql
+``` yql
SELECT
WeakField(my_column, String, "no value"),
WeakField(my_table.other_column, Int64)
FROM my_table;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/codegen.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/codegen.md
index afd230466c..e77c620ef4 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/codegen.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/codegen.md
@@ -17,7 +17,7 @@ In the text representation, S-expressions have the following format:
* Atom: ```'"foo"```. The apostrophe character (') denotes quoting of the next line that is usually enclosed in quotation marks.
* List: ```'("foo" "bar")```. The apostrophe character (') denotes that there will be no function call in parentheses.
-* Calling the built-in function: ```(foo "bar")```. The first item inside the brackets is the mandatory name of the function followed by the function arguments.
+* Calling the built-in function: ```(foo "bar")```. The first element inside the brackets is the mandatory name of the function followed by the function arguments.
* Declaring a lambda function: ```(lambda '(x y) (+ x y))```. The `lambda` keyword is followed by a list of argument names and then by the body of the lambda function.
* The lambda function argument is ```x```. Unlike an atom, a string without an apostrophe character (') references a name in the current scope. When declaring a lambda function, the names of arguments are added to the body's visibility scope, and, if needed, the name is hidden from the global scope.
* The ```world```.
@@ -33,8 +33,7 @@ To learn more about code generation, see a [separate introductory article](../..
Serializing the code as [S-expressions](/docs/s_expressions). The code must not contain free arguments of functions, hence, to serialize the lambda function code, you must pass it completely, avoiding passing individual expressions that might contain lambda function arguments.
**Examples:**
-
-```yql
+``` yql
SELECT FormatCode(AtomCode("foo"));
-- (
-- (return '"foo")
@@ -46,8 +45,7 @@ SELECT FormatCode(AtomCode("foo"));
Build a code node with the `world` type.
**Examples:**
-
-```yql
+``` yql
SELECT FormatCode(WorldCode());
-- (
-- (return world)
@@ -59,8 +57,7 @@ SELECT FormatCode(WorldCode());
Build a code node with the `atom` type from a string passed to the argument.
**Examples:**
-
-```yql
+``` yql
SELECT FormatCode(AtomCode("foo"));
-- (
-- (return '"foo")
@@ -72,8 +69,7 @@ SELECT FormatCode(AtomCode("foo"));
Build a code node with the `list` type from a set of nodes or lists of code nodes passed to arguments. In this case, lists of arguments are built in as separately listed code nodes.
**Examples:**
-
-```yql
+``` yql
SELECT FormatCode(ListCode(
AtomCode("foo"),
AtomCode("bar")));
@@ -94,8 +90,7 @@ SELECT FormatCode(ListCode(AsList(
Build a code node with the `built-in function call` from a string with the function name and a set of nodes or lists of code nodes passed to arguments. In this case, lists of arguments are built in as separately listed code nodes.
**Examples:**
-
-```yql
+``` yql
SELECT FormatCode(FuncCode(
"Baz",
AtomCode("foo"),
@@ -122,8 +117,7 @@ You can build a code node with the `lambda function declaration` type from:
* The number of arguments and a [lambda function](../../syntax/expressions.md#lambda) with one argument. In this case, a list of nodes of the `argument`type will be passed as an argument to this lambda function.
**Examples:**
-
-```yql
+``` yql
SELECT FormatCode(LambdaCode(($x, $y) -> {
RETURN FuncCode("+", $x, $y);
}));
@@ -144,8 +138,7 @@ SELECT FormatCode(LambdaCode(2, ($args) -> {
Substituting the code node passed in the argument, into the main program code.
**Examples:**
-
-```yql
+``` yql
SELECT EvaluateCode(FuncCode("Int32", AtomCode("1"))); -- 1
$lambda = EvaluateCode(LambdaCode(($x, $y) -> {
@@ -159,8 +152,7 @@ SELECT $lambda(1, 2); -- 3
Substituting the code node representing the result of evaluating an expression passed in the argument, into the main program.
**Examples:**
-
-```yql
+``` yql
$add3 = EvaluateCode(LambdaCode(($x) -> {
RETURN FuncCode("+", $x, ReprCode(1 + 2));
}));
@@ -172,8 +164,7 @@ SELECT $add3(1); -- 4
Substituting into the main program the code node that represents an expression or a [lambda function](../../syntax/expressions.md#lambda) passed in the argument. If free arguments of lambda functions were found during the substitution, they are calculated and substituted into the code as in the [ReprCode](#reprcode) function.
**Examples:**
-
-```yql
+``` yql
$lambda = ($x, $y) -> { RETURN $x + $y };
$makeClosure = ($y) -> {
RETURN EvaluateCode(LambdaCode(($x) -> {
@@ -184,4 +175,3 @@ $makeClosure = ($y) -> {
$closure = $makeClosure(2);
SELECT $closure(1); -- 3
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/dict.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/dict.md
index b2f126ee8b..f8a4c42172 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/dict.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/dict.md
@@ -7,8 +7,7 @@ Construct an empty dictionary. Two arguments are passed: for a key and a value.
[Documentation for the type definition format](../../types/type_string.md).
**Examples**
-
-```yql
+``` yql
SELECT DictCreate(String, Tuple<String,Double?>);
```
@@ -23,8 +22,7 @@ Construct an empty set. An argument is passed: the key type that can be built by
[Documentation for the type definition format](../../types/type_string.md).
**Examples**
-
-```yql
+``` yql
SELECT SetCreate(String);
```
@@ -34,38 +32,29 @@ SELECT SetCreate(Tuple<Int32?,String>);
## DictLength {#dictlength}
-The count of items in the dictionary.
+The count of elements in the dictionary.
**Examples**
-
-```yql
+``` yql
SELECT DictLength(AsDict(AsTuple(1, AsList("foo", "bar"))));
```
-
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT DictLength(dict_column) FROM my_table;
```
-
{% endif %}
-
## DictHasItems {#dicthasitems}
-Check that the dictionary contains at least one item.
+Check that the dictionary contains at least one element.
**Examples**
-
-```yql
+``` yql
SELECT DictHasItems(AsDict(AsTuple(1, AsList("foo", "bar")))) FROM my_table;
```
-
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT DictHasItems(dict_column) FROM my_table;
```
-
{% endif %}
## DictItems {#dictitems}
@@ -74,58 +63,47 @@ Get dictionary contents as a list of tuples including key-value pairs (`List<Tup
**Examples**
-```yql
+``` yql
SELECT DictItems(AsDict(AsTuple(1, AsList("foo", "bar"))));
-- [ ( 1, [ "foo", "bar" ] ) ]
```
-
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT DictItems(dict_column)
FROM my_table;
```
-
{% endif %}
-
## DictKeys {#dictkeys}
Get a list of dictionary keys.
**Examples**
-```yql
+``` yql
SELECT DictKeys(AsDict(AsTuple(1, AsList("foo", "bar"))));
-- [ 1 ]
```
-
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT DictKeys(dict_column)
FROM my_table;
```
-
{% endif %}
-
## DictPayloads {#dictpayloads}
Get a list of dictionary values.
**Examples**
-```yql
+``` yql
SELECT DictPayloads(AsDict(AsTuple(1, AsList("foo", "bar"))));
-- [ [ "foo", "bar" ] ]
```
-
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT DictPayloads(dict_column)
FROM my_table;
```
-
{% endif %}
## DictLookup {#dictlookup}
@@ -134,21 +112,18 @@ Get a dictionary element by its key.
**Examples**
-```yql
+``` yql
SELECT DictLookup(AsDict(
AsTuple(1, AsList("foo", "bar")),
AsTuple(2, AsList("bar", "baz"))
), 1);
-- [ "foo", "bar" ]
```
-
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT DictLookup(dict_column, "foo")
FROM my_table;
```
-
{% endif %}
## DictContains {#dictcontains}
@@ -157,21 +132,18 @@ Checking if an element in the dictionary using its key. Returns true or false.
**Examples**
-```yql
+``` yql
SELECT DictContains(AsDict(
AsTuple(1, AsList("foo", "bar")),
AsTuple(2, AsList("bar", "baz"))
), 42);
-- false
```
-
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT DictContains(dict_column, "foo")
FROM my_table;
```
-
{% endif %}
## DictAggregate {#dictaggregate}
@@ -194,6 +166,7 @@ SELECT DictAggregate(AsDict(
AsTuple(2, AsList("baz", "qwe"))),
AggregationFactory("Max"));
-- {1 : "foo", 2 : "qwe" }
+
```
## SetIsDisjoint {#setisjoint}
@@ -222,8 +195,7 @@ Arguments:
* An optional function that combines the values from the source dictionaries to construct the values of the output dictionary. If such a function has the `(K,V1,V2) -> U` type, the result type is `Dict<K,U>`. If the function is not specified, the result type is `Dict<K,Void>`, and the values from the source dictionaries are ignored.
**Examples**
-
-```yql
+``` yql
SELECT SetIntersection(ToSet(AsList(1, 2, 3)), ToSet(AsList(3, 4))); -- { 3 }
SELECT SetIntersection(
AsDict(AsTuple(1, "foo"), AsTuple(3, "bar")),
@@ -242,8 +214,7 @@ So there are two options to make a call:
* With the `Dict<K,V1>` and `Dict<K,V2>` arguments.
**Examples**
-
-```yql
+``` yql
SELECT SetIncludes(ToSet(AsList(1, 2, 3)), AsList(3, 4)); -- false
SELECT SetIncludes(ToSet(AsList(1, 2, 3)), ToSet(AsList(2, 3))); -- true
```
@@ -258,8 +229,7 @@ Arguments:
* An optional function that combines the values from the source dictionaries to construct the values of the output dictionary. If such a function has the `(K,V1?,V2?) -> U` type, the result type is `Dict<K,U>`. If the function is not specified, the result type is `Dict<K,Void>`, and the values from the source dictionaries are ignored.
**Examples**
-
-```yql
+``` yql
SELECT SetUnion(ToSet(AsList(1, 2, 3)), ToSet(AsList(3, 4))); -- { 1, 2, 3, 4 }
SELECT SetUnion(
AsDict(AsTuple(1, "foo"), AsTuple(3, "bar")),
@@ -273,8 +243,7 @@ SELECT SetUnion(
Construct a dictionary containing all the keys with their values in the first dictionary with no matching key in the second dictionary.
**Examples**
-
-```yql
+``` yql
SELECT SetDifference(ToSet(AsList(1, 2, 3)), ToSet(AsList(3, 4))); -- { 1, 2 }
SELECT SetDifference(
AsDict(AsTuple(1, "foo"), AsTuple(2, "bar")),
@@ -292,8 +261,7 @@ Arguments:
* An optional function that combines the values from the source dictionaries to construct the values of the output dictionary. If such a function has the `(K,V1?,V2?) -> U` type, the result type is `Dict<K,U>`. If the function is not specified, the result type is `Dict<K,Void>`, and the values from the source dictionaries are ignored.
**Examples**
-
-```yql
+``` yql
SELECT SetSymmetricDifference(ToSet(AsList(1, 2, 3)), ToSet(AsList(3, 4))); -- { 1, 2, 4 }
SELECT SetSymmetricDifference(
AsDict(AsTuple(1, "foo"), AsTuple(3, "bar")),
@@ -301,4 +269,3 @@ SELECT SetSymmetricDifference(
($k, $a, $b) -> { RETURN AsTuple($a, $b) });
-- { 2 : (null, "qwe"), 3 : ("bar", null) }
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/json.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/json.md
index 4424310007..c199107b6e 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/json.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/json.md
@@ -1,1150 +1,1129 @@
-# Functions for JSON
-
-**JSON** is a lightweight [data-interchange format](https://www.json.org). In YQL, it's represented by the `Json` type. Unlike relational tables, JSON can store data with no schema defined. Here is an example of a valid JSON object:
-
-```json
-[
- {
- "name": "Jim Holden",
- "age": 30
- },
- {
- "name": "Naomi Nagata",
- "age": "twenty years old"
- }
-]
-```
-
-Despite the fact that the `age` field in the first object is of the `Number` type (`"age": 21`) and in the second object its type is `String` (`"age": "twenty years old"`), this is a fully valid JSON object.
-
-To work with JSON, YQL implements a subset of the [SQL support for JavaScript Object Notation (JSON)](https://www.iso.org/standard/67367.html) standard, which is part of the common ANSI SQL standard.
-
-## JsonPath
-
-Values inside JSON objects are accessed using a query language called JsonPath. All functions for JSON accept a JsonPath query as an argument.
-
-Let's look at an example. Suppose we have a JSON object like:
-
-```json
-{
- "comments": [
- {
- "id": 123,
- "text": "A whisper will do, if it's all that you can manage."
- },
- {
- "id": 456,
- "text": "My life has become a single, ongoing revelation that I haven’t been cynical enough."
- }
- ]
-}
-```
-
-Then, to get the text of the second comment, we can write the following JsonPath query:
-
-```
-$.comments[1].text
-```
-
-In this query:
-
-1. `$` is a way to access the entire JSON object.
-2. `$.comments` accesses the `comments` key of the JSON object.
-3. `$.comments[1]` accesses the second element of the JSON array (element numbering starts from 0).
-4. `$.comments[1].text` accesses the `text` key of the JSON object.
-5. Query execution result: `"My life has become a single, ongoing revelation that I haven’t been cynical enough."`
-
-### Quick reference
-
-| Operation | Example |
-| --------------------------------------- | ------------------------------------------------- |
-| Retrieving a JSON object key | `$.key` |
-| Retrieving all JSON object keys | `$.*` |
-| Accessing an array element | `$[25]` |
-| Retrieving an array subsegment | `$[2 to 5]` |
-| Accessing the last array element | `$[last]` |
-| Accessing all array elements | `$[*]` |
-| Unary operations | `- 1` |
-| Binary operations | `(12 * 3) % 4 + 8` |
-| Accessing a variable | `$variable` |
-| Logical operations | `(1 > 2) || (3 <= 4) && ("string" == "another")` |
-| Matching a regular expression | `$.name like_regex "^[A-Za-z]+$"` |
-| Checking the string prefix | `$.name starts with "Bobbie"` |
-| Checking if a path exists | `exists ($.profile.name)` |
-| Checking a Boolean expression for null | `($.age > 20) is unknown` |
-| Filtering values | `$.friends ? (@.age >= 18 && @.gender == "male")` |
-| Getting the value type | `$.name.type()` |
-| Getting the array size | `$.friends.size()` |
-| Converting a string to a number | `$.number.double()` |
-| Rounding up a number | `$.number.ceiling()` |
-| Rounding down a number | `$.number.floor()` |
-| Returning the absolute value | `$.number.abs()` |
-| Getting key-value pairs from an object | `$.profile.keyvalue()` |
-
-### Data model
-
-The result of executing all JsonPath expressions is a sequence of JSON values. For example:
-
-- The result of executing the `"Bobbie"` expression is a sequence with the only element `"Bobbie"`. Its length is 1.
-- The result of executing the `$` expression (that takes the entire JSON object) in JSON `[1, 2, 3]` is `[1, 2, 3]`. A sequence of 1 element of the array `[1, 2, 3]`
-- The result of executing the `$[*]` expression (retrieving all array elements) in JSON `[1, 2, 3]` is `1, 2, 3`. A sequence of three items:`1`, `2`, and `3`
-
-If the input sequence consists of multiple values, some operations are performed for each element (for example, accessing a JSON object key). However, other operations require a sequence of one element as input (for example, binary arithmetic operations).
-
-The behavior of a specific operation is described in the corresponding section of the documentation.
-
-### Execution mode
-
-JsonPath supports two execution modes, `lax` and `strict`. Setting the mode is optional. By default, `lax`. The mode is specified at the beginning of a query. For example, `strict $.key`.
-
-The behavior for each mode is described in the corresponding sections with JsonPath operations.
-
-#### Auto unpacking of arrays
-
-When accessing a JSON object key in `lax` mode, arrays are automatically unpacked.
-
-**Example:**
-
-```json
-[
- {
- "key": 123
- },
- {
- "key": 456
- }
-]
-```
-
-The `lax $.key` query is successful and returns `123, 456`. As `$` is an array, it's automatically unpacked and accessing the key of the `$.key` JSON object is executed for each element in the array.
-
-The `strict $.key` query returns an error. In `strict` mode, there is no support for auto unpacking of arrays. Since `$` is an array and not an object, accessing the `$.key` object key is impossible. You can fix this by writing `strict $[*].key`.
-
-Unpacking is only 1 level deep. In the event of nested arrays, only the outermost one is unpacked.
-
-#### Wrapping values in arrays
-
-When accessing an array element in `lax` mode, JSON values are automatically wrapped in an array.
-
-**Example:**
-
-```json
-{
- "name": "Avasarala"
-}
-```
-
-The `lax $[0].name` query is successful and returns `"Avasarala"`. As `$` isn't an array, it's automatically wrapped in an array of length 1. Accessing the first element `$[0]` returns the source JSON object where the `name` key is taken.
-
-The `strict $[0].name` query returns an error. In `strict` mode, values aren't wrapped in an array automatically. Since `$` is an object and not an array, accessing the `$[0]` element is impossible. You can fix this by writing `strict $.name`.
-
-#### Handling errors
-
-Some errors are converted to an empty result when a query is executed in `lax` mode.
-
-### Literals
-
-Values of some types can be specified in a JsonPath query using literals:
-
-| Type | Example |
-| ------------------ | ---------------- |
-| Numbers | `42`, `-1.23e-5` |
-| Boolean values | `false`, `true` |
-| Null | `Null` |
-| Stings | `"Belt"` |
-
-### Accessing JSON object keys
-
-JsonPath supports accessing JSON object keys, such as `$.session.user.name`.
-
-{% note info %}
-
-Accessing keys without quotes is only supported for keys that start with an English letter or underscore and only contain English letters, underscores, numbers, and a dollar sign. Use quotes for all other keys. For example, `$.profile."this string has spaces"` or `$.user."42 is the answer"`
-
-{% endnote %}
-
-For each value from the input sequence:
-
-1. If the value is an array, it's automatically unpacked in `lax` mode.
-2. If the value isn't a JSON object or if it is and the specified key is missing from this JSON object, a query executed in `strict` mode fails. In `lax` mode, an empty result is returned for this value.
-
-The expression execution result is the concatenation of the results for each value from the input sequence.
-
-**Example:**
-
-```json
-{
- "name": "Amos",
- "friends": [
- {
- "name": "Jim"
- },
- {
- "name": "Alex"
- }
- ]
-}
-```
-
-| | `lax` | `strict` |
-| ---------------- | ---------------- | -------- |
-| `$.name` | `"Amos"` | `"Amos"` |
-| `$.surname` | Empty result | Error |
-| `$.friends.name` | `"Jim", "Alex"` | Error |
-
-### Accessing all JSON object keys
-
-JsonPath supports accessing all JSON object keys at once: `$.*`.
-
-For each value from the input sequence:
-
-1. If the value is an array, it's automatically unpacked in `lax` mode.
-2. If the value isn't a JSON object, a query executed in `strict` mode fails. In `lax` mode, an empty result is returned for this value.
-
-The expression execution result is the concatenation of the results for each value from the input sequence.
-
-**Example:**
-
-```json
-{
- "profile": {
- "id": 123,
- "name": "Amos"
- },
- "friends": [
- {
- "name": "Jim"
- },
- {
- "name": "Alex"
- }
- ]
-}
-```
-
-| | `lax` | `strict` |
-| ------------- | --------------- | ------------- |
-| `$.profile.*` | `123, "Amos"` | `123, "Amos"` |
-| `$.friends.*` | `"Jim", "Alex"` | Error |
-
-### Accessing an array element
-
-JsonPath supports accessing array elements: `$.friends[1, 3 to last - 1]`.
-
-For each value from the input sequence:
-
-1. If the value isn't an array, a query executed in `strict` mode fails. In `lax` mode, values are automatically wrapped in an array.
-2. The `last` keyword is replaced with the array's last index. Using `last` outside of accessing the array is an error in both modes.
-3. The specified indexes are calculated. Each of them must be a single number, otherwise the query fails in both modes.
-4. If the index is a fractional number, it's rounded down.
-5. If the index goes beyond the array boundaries, the query executed in `strict` mode fails. In `lax` mode, this index is ignored.
-6. If a segment is specified and its start index is greater than the end index (for example, `$[20 to 1]`), the query fails in `strict` mode. In `lax` mode, this segment is ignored.
-7. All elements by the specified indexes are added to the result. Segments include **both ends**.
-
-**Examples**:
-
-```json
-[
- {
- "name": "Camina",
- "surname": "Drummer"
- },
- {
- "name": "Josephus",
- "surname": "Miller"
- },
- {
- "name": "Bobbie",
- "surname": "Draper"
- },
- {
- "name": "Julie",
- "surname": "Mao"
- }
-]
-```
-
-| | `lax` | `strict` |
-| ----------------------------- | ------------------------------- | ------------------------------- |
-| `$[0].name` | `"Camina"` | `"Camina"` |
-| `$[1, 2 to 3].name` | `"Josephus", "Bobbie", "Julie"` | `"Josephus", "Bobbie", "Julie"` |
-| `$[last - 2].name` | `"Josephus"` | `"Josephus"` |
-| `$[2, last + 200 to 50].name` | `"Bobbie"` | Error |
-| `$[50].name` | Empty result | Error |
-
-### Accessing all array elements
-
-JsonPath supports accessing all array elements at once: `$[*]`.
-
-For each value from the input sequence:
-
-1. If the value isn't an array, a query executed in `strict` mode fails. In `lax` mode, values are automatically wrapped in an array.
-2. All elements of the current array are added to the result.
-
-**Examples:**
-
-```json
-[
- {
- "class": "Station",
- "title": "Medina"
- },
- {
- "class": "Corvette",
- "title": "Rocinante"
- }
-]
-```
-
-| | `lax` | `strict` |
-| ------------------- | ------------------------- | ----------------------- |
-| `$[*].title` | `"Medina", "Rocinante"` | `"Medina", "Rocinante"` |
-| `lax $[0][*].class` | `"Station"` | Error |
-
-Let's analyze the last example step by step:
-
-1. `$[0]` returns the first element of the array, that is `{"class": "Station", "title": "Medina"}`
-2. `$[0][*]` expects an array for input, but an object was input instead. It's automatically wrapped in an array as `[ {"class": "Station", "title": "Medina"} ]`
-3. Now, `$[0][*]` can be executed and returns all elements of the array, that is `{"class": "Station", "title": "Medina"}`
-4. `$[0][*].class` returns the `class` field value: `"Station"`.
-
-### Arithmetic operations
-
-{% note info %}
-
-All arithmetic operations work with numbers as with Double. Calculations are made with potential [loss of accuracy](https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html).
-
-{% endnote %}
-
-#### Unary operations
-
-JsonPath supports unary `+` and `-`.
-
-A unary operation applies to all values from the input sequence. If a unary operation's input is a value that isn't a number, a query fails in both modes.
-
-**Example:**
-
-```json
-[1, 2, 3, 4]
-```
-
-The `strict -$[*]` query is successful and returns `-1, -2, -3, -4`.
-
-The `lax -$` query fails as `$` is an array and not a number.
-
-#### Binary operations
-
-JsonPath supports binary arithmetic operations (in descending order of priority):
-
-1. Multiplication `*`, dividing floating-point numbers `/`, and taking the remainder `%` (works as the `MOD` function in `SQL`).
-2. Addition `+`, subtraction `-`.
-
-You can change the order of operations using parentheses.
-
-If each argument of a binary operation is not a single number or a number is divided by 0, the query fails in both modes.
-
-**Examples:**
-
-- `(1 + 2) * 3` returns `9`
-- `1 / 2` returns `0.5`
-- `5 % 2` returns `1`
-- `1 / 0` fails
-- If JSON is `[-32.4, 5.2]`, the `$[0] % $[1]` query returns `-1.2`
-- If JSON is `[1, 2, 3, 4]`, the `lax $[*] + $[*]` query fails as the `$[*]` expression execution result is `1, 2, 3, 4`, that is multiple numbers. A binary operation only requires one number for each of its arguments.
-
-### Boolean values
-
-Unlike some other programming languages, Boolean values in JsonPath are not only `true` and `false`, but also `null` (uncertainty).
-
-JsonPath considers any values received from a JSON document to be non-Boolean. For example, a query like `! $.is_valid_user` (a logical negation applied to the `is_valid_user`) field is syntactically invalid because the `is_valid_user` field value is not Boolean (even when it actually stores `true` or `false`). The correct way to write this kind of query is to explicitly use a comparison with a Boolean value, such as `$.is_valid_user == false`.
-
-### Logical operations
-
-JsonPath supports some logical operations for Boolean values.
-
+# Functions for JSON
+
+**JSON** is a lightweight [data-interchange format](https://www.json.org). In YQL, it's represented by the `Json` type. Unlike relational tables, JSON can store data with no schema defined. Here is an example of a valid JSON object:
+```json
+[
+ {
+ "name": "Jim Holden",
+ "age": 30
+ },
+ {
+ "name": "Naomi Nagata",
+ "age": "twenty years old"
+ }
+]
+```
+Despite the fact that the `age` field in the first object is of the `Number` type (`"age": 21`) and in the second object its type is `String` (`"age": "twenty years old"`), this is a fully valid JSON object.
+
+To work with JSON, YQL implements a subset of the [SQL support for JavaScript Object Notation (JSON)](https://www.iso.org/standard/67367.html) standard, which is part of the common ANSI SQL standard.
+
+## JsonPath
+
+Values inside JSON objects are accessed using a query language called JsonPath. All functions for JSON accept a JsonPath query as an argument.
+
+Let's look at an example. Suppose we have a JSON object like:
+```json
+{
+ "comments": [
+ {
+ "id": 123,
+ "text": "A whisper will do, if it's all that you can manage."
+ },
+ {
+ "id": 456,
+ "text": "My life has become a single, ongoing revelation that I haven’t been cynical enough."
+ }
+ ]
+}
+```
+
+Then, to get the text of the second comment, we can write the following JsonPath query:
+```
+$.comments[1].text
+```
+
+In this query:
+
+1. `$` is a way to access the entire JSON object.
+2. `$.comments` accesses the `comments` key of the JSON object.
+3. `$.comments[1]` accesses the second element of the JSON array (element numbering starts from 0).
+4. `$.comments[1].text` accesses the `text` key of the JSON object.
+5. Query execution result: `"My life has become a single, ongoing revelation that I haven’t been cynical enough."`
+
+### Quick reference
+
+| Operation | Example |
+| --------------------------------------- | ------------------------------------------------- |
+| Retrieving a JSON object key | `$.key` |
+| Retrieving all JSON object keys | `$.*` |
+| Accessing an array element | `$[25]` |
+| Retrieving an array subsegment | `$[2 to 5]` |
+| Accessing the last array element | `$[last]` |
+| Accessing all array elements | `$[*]` |
+| Unary operations | `- 1` |
+| Binary operations | `(12 * 3) % 4 + 8` |
+| Accessing a variable | `$variable` |
+| Logical operations | `(1 > 2) || (3 <= 4) && ("string" == "another")` |
+| Matching a regular expression | `$.name like_regex "^[A-Za-z]+$"` |
+| Checking the string prefix | `$.name starts with "Bobbie"` |
+| Checking if a path exists | `exists ($.profile.name)` |
+| Checking a Boolean expression for null | `($.age > 20) is unknown` |
+| Filtering values | `$.friends ? (@.age >= 18 && @.gender == "male")` |
+| Getting the value type | `$.name.type()` |
+| Getting the array size | `$.friends.size()` |
+| Converting a string to a number | `$.number.double()` |
+| Rounding up a number | `$.number.ceiling()` |
+| Rounding down a number | `$.number.floor()` |
+| Returning the absolute value | `$.number.abs()` |
+| Getting key-value pairs from an object | `$.profile.keyvalue()` |
+
+### Data model
+
+The result of executing all JsonPath expressions is a sequence of JSON values. For example:
+
+* The result of executing the `"Bobbie"` expression is a sequence with the only element `"Bobbie"`. Its length is 1.
+* The result of executing the `$` expression (that takes the entire JSON object) in JSON `[1, 2, 3]` is `[1, 2, 3]`. A sequence of 1 element of the array `[1, 2, 3]`
+* The result of executing the `$[*]` expression (retrieving all array elements) in JSON `[1, 2, 3]` is `1, 2, 3`. A sequence of three elements:`1`, `2`, and `3`
+
+If the input sequence consists of multiple values, some operations are performed for each element (for example, accessing a JSON object key). However, other operations require a sequence of one element as input (for example, binary arithmetic operations).
+
+The behavior of a specific operation is described in the corresponding section of the documentation.
+
+### Execution mode
+
+JsonPath supports two execution modes, `lax` and `strict`. Setting the mode is optional. By default, `lax`. The mode is specified at the beginning of a query. For example, `strict $.key`.
+
+The behavior for each mode is described in the corresponding sections with JsonPath operations.
+
+#### Auto unpacking of arrays
+
+When accessing a JSON object key in `lax` mode, arrays are automatically unpacked.
+
+**Example:**
+```json
+[
+ {
+ "key": 123
+ },
+ {
+ "key": 456
+ }
+]
+```
+
+The `lax $.key` query is successful and returns `123, 456`. As `$` is an array, it's automatically unpacked and accessing the key of the `$.key` JSON object is executed for each element in the array.
+
+The `strict $.key` query returns an error. In `strict` mode, there is no support for auto unpacking of arrays. Since `$` is an array and not an object, accessing the `$.key` object key is impossible. You can fix this by writing `strict $[*].key`.
+
+Unpacking is only 1 level deep. In the event of nested arrays, only the outermost one is unpacked.
+
+#### Wrapping values in arrays
+
+When accessing an array element in `lax` mode, JSON values are automatically wrapped in an array.
+
+**Example:**
+```json
+{
+ "name": "Avasarala"
+}
+```
+
+The `lax $[0].name` query is successful and returns `"Avasarala"`. As `$` isn't an array, it's automatically wrapped in an array of length 1. Accessing the first element `$[0]` returns the source JSON object where the `name` key is taken.
+
+The `strict $[0].name` query returns an error. In `strict` mode, values aren't wrapped in an array automatically. Since `$` is an object and not an array, accessing the `$[0]` element is impossible. You can fix this by writing `strict $.name`.
+
+#### Handling errors
+
+Some errors are converted to an empty result when a query is executed in `lax` mode.
+
+### Literals
+
+Values of some types can be specified in a JsonPath query using literals:
+
+| Type | Example |
+| ------------------ | ---------------- |
+| Numbers | `42`, `-1.23e-5` |
+| Boolean values | `false`, `true` |
+| Null | `Null` |
+| Stings | `"Belt"` |
+
+### Accessing JSON object keys
+
+JsonPath supports accessing JSON object keys, such as `$.session.user.name`.
+
+{% note info %}
+
+Accessing keys without quotes is only supported for keys that start with an English letter or underscore and only contain English letters, underscores, numbers, and a dollar sign. Use quotes for all other keys. For example, `$.profile."this string has spaces"` or `$.user."42 is the answer"`
+
+{% endnote %}
+
+For each value from the input sequence:
+
+1. If the value is an array, it's automatically unpacked in `lax` mode.
+2. If the value isn't a JSON object or if it is and the specified key is missing from this JSON object, a query executed in `strict` mode fails. In `lax` mode, an empty result is returned for this value.
+
+The expression execution result is the concatenation of the results for each value from the input sequence.
+
+**Example:**
+```json
+{
+ "name": "Amos",
+ "friends": [
+ {
+ "name": "Jim"
+ },
+ {
+ "name": "Alex"
+ }
+ ]
+}
+```
+
+| | `lax` | `strict` |
+| ---------------- | ---------------- | -------- |
+| `$.name` | `"Amos"` | `"Amos"` |
+| `$.surname` | Empty result | Error |
+| `$.friends.name` | `"Jim", "Alex"` | Error |
+
+### Accessing all JSON object keys
+
+JsonPath supports accessing all JSON object keys at once: `$.*`.
+
+For each value from the input sequence:
+
+1. If the value is an array, it's automatically unpacked in `lax` mode.
+2. If the value isn't a JSON object, a query executed in `strict` mode fails. In `lax` mode, an empty result is returned for this value.
+
+The expression execution result is the concatenation of the results for each value from the input sequence.
+
+**Example:**
+```json
+{
+ "profile": {
+ "id": 123,
+ "name": "Amos"
+ },
+ "friends": [
+ {
+ "name": "Jim"
+ },
+ {
+ "name": "Alex"
+ }
+ ]
+}
+```
+
+| | `lax` | `strict` |
+| ------------- | --------------- | ------------- |
+| `$.profile.*` | `123, "Amos"` | `123, "Amos"` |
+| `$.friends.*` | `"Jim", "Alex"` | Error |
+
+### Accessing an array element
+
+JsonPath supports accessing array elements: `$.friends[1, 3 to last - 1]`.
+
+For each value from the input sequence:
+
+1. If the value isn't an array, a query executed in `strict` mode fails. In `lax` mode, values are automatically wrapped in an array.
+2. The `last` keyword is replaced with the array's last index. Using `last` outside of accessing the array is an error in both modes.
+3. The specified indexes are calculated. Each of them must be a single number, otherwise the query fails in both modes.
+4. If the index is a fractional number, it's rounded down.
+5. If the index goes beyond the array boundaries, the query executed in `strict` mode fails. In `lax` mode, this index is ignored.
+6. If a segment is specified and its start index is greater than the end index (for example, `$[20 to 1]`), the query fails in `strict` mode. In `lax` mode, this segment is ignored.
+7. All elements by the specified indexes are added to the result. Segments include **both ends**.
+
+**Examples**:
+```json
+[
+ {
+ "name": "Camina",
+ "surname": "Drummer"
+ },
+ {
+ "name": "Josephus",
+ "surname": "Miller"
+ },
+ {
+ "name": "Bobbie",
+ "surname": "Draper"
+ },
+ {
+ "name": "Julie",
+ "surname": "Mao"
+ }
+]
+```
+
+| | `lax` | `strict` |
+| ----------------------------- | ------------------------------- | ------------------------------- |
+| `$[0].name` | `"Camina"` | `"Camina"` |
+| `$[1, 2 to 3].name` | `"Josephus", "Bobbie", "Julie"` | `"Josephus", "Bobbie", "Julie"` |
+| `$[last - 2].name` | `"Josephus"` | `"Josephus"` |
+| `$[2, last + 200 to 50].name` | `"Bobbie"` | Error |
+| `$[50].name` | Empty result | Error |
+
+### Accessing all array elements
+
+JsonPath supports accessing all array elements at once: `$[*]`.
+
+For each value from the input sequence:
+
+1. If the value isn't an array, a query executed in `strict` mode fails. In `lax` mode, values are automatically wrapped in an array.
+2. All elements of the current array are added to the result.
+
+**Examples:**
+```json
+[
+ {
+ "class": "Station",
+ "title": "Medina"
+ },
+ {
+ "class": "Corvette",
+ "title": "Rocinante"
+ }
+]
+```
+
+| | `lax` | `strict` |
+| ------------------- | ------------------------- | ----------------------- |
+| `$[*].title` | `"Medina", "Rocinante"` | `"Medina", "Rocinante"` |
+| `lax $[0][*].class` | `"Station"` | Error |
+
+Let's analyze the last example step by step:
+
+1. `$[0]` returns the first element of the array, that is `{"class": "Station", "title": "Medina"}`
+2. `$[0][*]` expects an array for input, but an object was input instead. It's automatically wrapped in an array as `[ {"class": "Station", "title": "Medina"} ]`
+3. Now, `$[0][*]` can be executed and returns all elements of the array, that is `{"class": "Station", "title": "Medina"}`
+4. `$[0][*].class` returns the `class` field value: `"Station"`.
+
+### Arithmetic operations
+
+{% note info %}
+
+All arithmetic operations work with numbers as with Double. Calculations are made with potential [loss of accuracy](https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html).
+
+{% endnote %}
+
+#### Unary operations
+
+JsonPath supports unary `+` and `-`.
+
+A unary operation applies to all values from the input sequence. If a unary operation's input is a value that isn't a number, a query fails in both modes.
+
+**Example:**
+```json
+[1, 2, 3, 4]
+```
+
+The `strict -$[*]` query is successful and returns `-1, -2, -3, -4`.
+
+The `lax -$` query fails as `$` is an array and not a number.
+
+#### Binary operations
+
+JsonPath supports binary arithmetic operations (in descending order of priority):
+
+1. Multiplication `*`, dividing floating-point numbers `/`, and taking the remainder `%` (works as the `MOD` function in `SQL`).
+2. Addition `+`, subtraction `-`.
+
+You can change the order of operations using parentheses.
+
+If each argument of a binary operation is not a single number or a number is divided by 0, the query fails in both modes.
+
+**Examples:**
+
+- `(1 + 2) * 3` returns `9`
+- `1 / 2` returns `0.5`
+- `5 % 2` returns `1`
+- `1 / 0` fails
+- If JSON is `[-32.4, 5.2]`, the `$[0] % $[1]` query returns `-1.2`
+- If JSON is `[1, 2, 3, 4]`, the `lax $[*] + $[*]` query fails as the `$[*]` expression execution result is `1, 2, 3, 4`, that is multiple numbers. A binary operation only requires one number for each of its arguments.
+
+### Boolean values
+
+Unlike some other programming languages, Boolean values in JsonPath are not only `true` and `false`, but also `null` (uncertainty).
+
+JsonPath considers any values received from a JSON document to be non-Boolean. For example, a query like `! $.is_valid_user` (a logical negation applied to the `is_valid_user`) field is syntactically invalid because the `is_valid_user` field value is not Boolean (even when it actually stores `true` or `false`). The correct way to write this kind of query is to explicitly use a comparison with a Boolean value, such as `$.is_valid_user == false`.
+
+### Logical operations
+
+JsonPath supports some logical operations for Boolean values.
+
The arguments of any logical operation must be a single Boolean value.
-All logical operations return a Boolean value.
-
-**Logical negation,`!`**
-
-Truth table:
-
-| `x` | `!x` |
-| ------- | ------- |
-| `true` | `false` |
-| `false` | `true` |
-| `Null` | `Null` |
-
-**Logical AND, `&&`**
-
-In the truth table, the first column is the left argument, the first row is the right argument, and each cell is the result of using the Logical AND both with the left and right arguments:
-
-| `&&` | `true` | `false` | `Null` |
-| ------- | ------- | ------- | ------- |
-| `true` | `true` | `false` | `Null` |
-| `false` | `false` | `false` | `false` |
-| `Null` | `Null` | `false` | `Null` |
-
-**Logical OR, `||`**
-
-In the truth table, the first column is the left argument, the first row is the right argument, and each cell is the result of using the logical OR with both the left and right arguments:
-
-| `||` | `true` | `false` | `Null` |
-| ------- | ------- | ------- | ------- |
-| `true` | `true` | `true` | `true` |
-| `false` | `true` | `false` | `Null` |
-| `Null` | `true` | `Null` | `Null` |
-
-**Examples:**
-
-- `! (true == true)`, the result is `false`
-- `(true == true) && (true == false)`, the result is `false`
-- `(true == true) || (true == false)`, the result is `true`
-
-### Comparison operators
-
-JsonPath implements comparison operators for values:
-
-- Equality, `==`
-- Inequality, `!=`and `<>`
-- Less than and less than or equal to, `<` and `=`
-- Greater than and greater than or equal to, `>` and `>=`
-
-All comparison operators return a Boolean value. Both operator arguments support multiple values.
-
-If an error occurs when calculating the operator arguments, it returns `null`. In this case, the JsonPath query execution continues.
-
-The arrays of each of the arguments are automatically unpacked. After that, for each pair where the first element is taken from the sequence of the left argument and the second one from the sequence of the right argument:
-
-1. The elements of the pair are compared
-2. If an error occurs during the comparison, the `ERROR` flag is set.
-3. If the comparison result is true, the flag set is `FOUND`
-4. If either the `ERROR` or `FOUND` flag is set and the query is executed in `lax` mode, no more pairs are analyzed.
-
-If the pair analysis results in:
-
-1. The `ERROR` flag is set, the operator returns `null`
-2. The `FOUND` flag is set, the operator returns `true`
-3. Otherwise, it returns `false`
-
-We can say that this algorithm considers all pairs from the Cartesian product of the left and right arguments, trying to find the pair whose comparison returns true.
-
-Elements in a pair are compared according to the following rules:
-
-1. If the left or right argument is an array or object, the comparison fails.
-2. `null == null` returns true
-3. In all other cases, if one of the arguments is `null`, false is returned.
-4. If the left and right arguments are of different types, the comparison fails.
-5. Strings are compared byte by byte.
-6. `true` is considered greater than `false`
-7. Numbers are compared with the accuracy of `1e-20`
-
-**Example:**
-
-Let's take a JSON document as an example
-
-```json
-{
- "left": [1, 2],
- "right": [4, "Inaros"]
-}
-```
-
-and analyze the steps for executing the `lax $.left < $.right` query:
-
-1. Auto unpacking of arrays in the left and right arguments. As a result, the left argument is the sequence `1, 2` and the right argument is `4, "Iranos"`
-2. Let's take the pair `(1, 4)`. The comparison is successful as `1 < 4` is true. Set the flag `FOUND`
-3. Since the query is executed in `lax` mode and the `FOUND` flag is set, we aren't analyzing any more pairs.
-4. Since we have the `FOUND` flag set, the operator returns true.
-
-Let's take the same query in a different execution mode: `strict $.left < $.right`:
-
-1. Auto unpacking of arrays in the left and right arguments. As a result, the left argument is the sequence `1, 2` and the right argument is `4, "Iranos"`
-2. Let's take the pair `(1, 4)`. The comparison is successful as `1 < 4` is true. Set the flag `FOUND`
-3. Let's take the pair `(2, 4)`. The comparison is successful as `2 < 4` is true. Set the flag `FOUND`
-4. Let's take the pair `(1, "Iranos")`. The comparison fails as a number can't be compared with a string. Set the flag `ERROR`
-5. Let's take the pair `(2, "Iranos")`. The comparison fails as a number can't be compared with a string. Set the flag `ERROR`
-6. Since we have the `ERROR` flag set, the operator returns `null`
-
-### Predicates
-
-JsonPath supports predicates which are expressions that return a Boolean value and check a certain condition. You can use them, for example, in filters.
-
-#### `like_regex`
-
-The `like_regex` predicate lets you check if a string matches a regular expression. The syntax of regular expressions is the same as in [Hyperscan UDF](../../udf/list/hyperscan.md) and [REGEXP](../../syntax/expressions.md#regexp).
-
-**Syntax**
-
-```
-<expression> like_regex <regexp string> [flag <flag string>]
-```
-
-Where:
-
-1. `<expression>` is a JsonPath expression with strings to be checked for matching the regular expression.
-2. `<regexp string>` is a string with the regular expression.
-3. `flag <flag string>` is an optional section where `<flag string>` is a string with regular expression execution flags.
-
-Supported flags:
-
-- `i`: Disable the case sensitivity.
-
-**Execution**
-
-Before the check, the input sequence arrays are automatically unpacked.
-
-After that, for each element of the input sequence:
-
-1. A check is made to find out if a string matches a regular expression.
-2. If the element isn't a string, the `ERROR` flag is set.
-3. If the check result is true, the `FOUND` flag is set.
-4. If either the `ERROR` or `FOUND` flag is set and the query is executed in `lax` mode, no more pairs are analyzed.
-
-If the pair analysis results in:
-
-1. Setting the `ERROR` flag, the predicate returns `null`
-2. Setting the `FOUND` flag, the predicate returns `true`
-3. Otherwise, the predicate returns `false`
-
-**Examples**
-
-1. `"123456" like_regex "^[0-9]+$"` returns `true`
-2. `"123abcd456" like_regex "^[0-9]+$"` returns `false`
-3. `"Naomi Nagata" like_regex "nag"` returns `false`
-4. `"Naomi Nagata" like_regex "nag" flag "i"` returns `true`
-
-#### `starts with`
-
-The `starts with` predicate lets you check if one string is a prefix of another.
-
-**Syntax**
-
-```
-<string expression> starts with <prefix expression>
-```
-
-Where:
-
-1. `<string expression>` is a JsonPath expression with the string to check.
-2. `<prefix expression>` is a JsonPath expression with a prefix string.
-
-This means that the predicate will check that the `<string expression>` starts with the `<prefix expression>` string.
-
-**Execution**
-
-The first argument of the predicate must be a single string.
-
-The second argument of the predicate must be a sequence of (possibly, multiple) strings.
-
-For each element in a sequence of prefix strings:
-
-1. A check is made for whether "an element is a prefix of an input string"
-2. If the element isn't a string, the `ERROR` flag is set.
-3. If the check result is true, the `FOUND` flag is set.
-4. If either the `ERROR` or `FOUND` flag is set and the query is executed in `lax` mode, no more pairs are analyzed.
-
-If the pair analysis results in:
-
-1. Setting the `ERROR` flag, the predicate returns `null`
-2. Setting the `FOUND` flag, the predicate returns `true`
-3. Otherwise, the predicate returns `false`
-
-**Examples**
-
-1. `"James Holden" starts with "James"` returns `true`
-2. `"James Holden" starts with "Amos"` returns `false`
-
-#### `exists`
-
-The `exists` predicate lets you check whether a JsonPath expression returns at least one element.
-
-**Syntax**
-
-```
-exists (<expression>)
-```
-
-Where `<expression>` is the JsonPath expression to be checked. Parentheses around the expression are required.
-
-**Execution**
-
-1. The passed JsonPath expression is executed.
-2. If an error occurs, the predicate returns `null`
-3. If an empty sequence is obtained as a result of the execution, the predicate returns `false`
-4. Otherwise, the predicate returns `true`
-
-**Examples**
-
-Let's take a JSON document:
-
-```json
-{
- "profile": {
- "name": "Josephus",
- "surname": "Miller"
- }
-}
-```
-
-1. `exists ($.profile.name)` returns `true`
-2. `exists ($.friends.profile.name)` returns `false`
-3. `strict exists ($.friends.profile.name)` returns `null`, because accessing non-existent object keys in `strict` mode is an error.
-
-#### `is unknown`
-
-The `is unknown` predicate lets you check if a Boolean value is `null`.
-
-**Syntax**
-
-```
-(<expression>) is unknown
-```
-
-Where `<expression>` is the JsonPath expression to be checked. Only expressions that return a Boolean value are allowed. Parentheses around the expression are required.
-
-**Execution**
-
-1. If the passed expression returns `null`, the predicate returns `true`
-2. Otherwise, the predicate returns `false`
-
-**Examples**
-
-1. `(1 == 2) is unknown` returns `false`. The `1 == 2` expression returned `false`, which is not `null`
-2. `(1 == "string") is unknown` returns `true`. The `1 == "string"` expression returned `null`, because strings and numbers can't be compared in JsonPath.
-
-### Filters
-
-JsonPath lets you filter values obtained during query execution.
-
+All logical operations return a Boolean value.
+
+**Logical negation,`!`**
+
+Truth table:
+
+| `x` | `!x` |
+| ------- | ------- |
+| `true` | `false` |
+| `false` | `true` |
+| `Null` | `Null` |
+
+**Logical AND, `&&`**
+
+In the truth table, the first column is the left argument, the first row is the right argument, and each cell is the result of using the Logical AND both with the left and right arguments:
+
+| `&&` | `true` | `false` | `Null` |
+| ------- | ------- | ------- | ------- |
+| `true` | `true` | `false` | `Null` |
+| `false` | `false` | `false` | `false` |
+| `Null` | `Null` | `false` | `Null` |
+
+**Logical OR, `||`**
+
+In the truth table, the first column is the left argument, the first row is the right argument, and each cell is the result of using the logical OR with both the left and right arguments:
+
+| `||` | `true` | `false` | `Null` |
+| ------- | ------- | ------- | ------- |
+| `true` | `true` | `true` | `true` |
+| `false` | `true` | `false` | `Null` |
+| `Null` | `true` | `Null` | `Null` |
+
+**Examples:**
+
+- `! (true == true)`, the result is `false`
+- `(true == true) && (true == false)`, the result is `false`
+- `(true == true) || (true == false)`, the result is `true`
+
+### Comparison operators
+
+JsonPath implements comparison operators for values:
+
+- Equality, `==`
+- Inequality, `!=`and `<>`
+- Less than and less than or equal to, `<` and `=`
+- Greater than and greater than or equal to, `>` and `>=`
+
+All comparison operators return a Boolean value. Both operator arguments support multiple values.
+
+If an error occurs when calculating the operator arguments, it returns `null`. In this case, the JsonPath query execution continues.
+
+The arrays of each of the arguments are automatically unpacked. After that, for each pair where the first element is taken from the sequence of the left argument and the second one from the sequence of the right argument:
+
+1. The elements of the pair are compared
+2. If an error occurs during the comparison, the `ERROR` flag is set.
+3. If the comparison result is true, the flag set is `FOUND`
+4. If either the `ERROR` or `FOUND` flag is set and the query is executed in `lax` mode, no more pairs are analyzed.
+
+If the pair analysis results in:
+
+1. The `ERROR` flag is set, the operator returns `null`
+2. The `FOUND` flag is set, the operator returns `true`
+3. Otherwise, it returns `false`
+
+We can say that this algorithm considers all pairs from the Cartesian product of the left and right arguments, trying to find the pair whose comparison returns true.
+
+Elements in a pair are compared according to the following rules:
+
+1. If the left or right argument is an array or object, the comparison fails.
+2. `null == null` returns true
+3. In all other cases, if one of the arguments is `null`, false is returned.
+4. If the left and right arguments are of different types, the comparison fails.
+5. Strings are compared byte by byte.
+6. `true` is considered greater than `false`
+7. Numbers are compared with the accuracy of `1e-20`
+
+**Example:**
+
+Let's take a JSON document as an example
+
+```json
+{
+ "left": [1, 2],
+ "right": [4, "Inaros"]
+}
+```
+
+and analyze the steps for executing the `lax $.left < $.right` query:
+
+1. Auto unpacking of arrays in the left and right arguments. As a result, the left argument is the sequence `1, 2` and the right argument is `4, "Iranos"`
+2. Let's take the pair `(1, 4)`. The comparison is successful as `1 < 4` is true. Set the flag `FOUND`
+3. Since the query is executed in `lax` mode and the `FOUND` flag is set, we aren't analyzing any more pairs.
+4. Since we have the `FOUND` flag set, the operator returns true.
+
+Let's take the same query in a different execution mode: `strict $.left < $.right`:
+
+1. Auto unpacking of arrays in the left and right arguments. As a result, the left argument is the sequence `1, 2` and the right argument is `4, "Iranos"`
+2. Let's take the pair `(1, 4)`. The comparison is successful as `1 < 4` is true. Set the flag `FOUND`
+3. Let's take the pair `(2, 4)`. The comparison is successful as `2 < 4` is true. Set the flag `FOUND`
+4. Let's take the pair `(1, "Iranos")`. The comparison fails as a number can't be compared with a string. Set the flag `ERROR`
+5. Let's take the pair `(2, "Iranos")`. The comparison fails as a number can't be compared with a string. Set the flag `ERROR`
+6. Since we have the `ERROR` flag set, the operator returns `null`
+
+### Predicates
+
+JsonPath supports predicates which are expressions that return a Boolean value and check a certain condition. You can use them, for example, in filters.
+#### `like_regex`
+
+The `like_regex` predicate lets you check if a string matches a regular expression. The syntax of regular expressions is the same as in [Hyperscan UDF](../../udf/list/hyperscan.md) and [REGEXP](../../syntax/expressions.md#regexp).
+
+**Syntax**
+
+```
+<expression> like_regex <regexp string> [flag <flag string>]
+```
+
+Where:
+
+1. `<expression>` is a JsonPath expression with strings to be checked for matching the regular expression.
+2. `<regexp string>` is a string with the regular expression.
+3. `flag <flag string>` is an optional section where `<flag string>` is a string with regular expression execution flags.
+
+Supported flags:
+
+- `i`: Disable the case sensitivity.
+
+**Execution**
+
+Before the check, the input sequence arrays are automatically unpacked.
+
+After that, for each element of the input sequence:
+
+1. A check is made to find out if a string matches a regular expression.
+2. If the element isn't a string, the `ERROR` flag is set.
+3. If the check result is true, the `FOUND` flag is set.
+4. If either the `ERROR` or `FOUND` flag is set and the query is executed in `lax` mode, no more pairs are analyzed.
+
+If the pair analysis results in:
+
+1. Setting the `ERROR` flag, the predicate returns `null`
+2. Setting the `FOUND` flag, the predicate returns `true`
+3. Otherwise, the predicate returns `false`
+
+**Examples**
+
+1. `"123456" like_regex "^[0-9]+$"` returns `true`
+2. `"123abcd456" like_regex "^[0-9]+$"` returns `false`
+3. `"Naomi Nagata" like_regex "nag"` returns `false`
+4. `"Naomi Nagata" like_regex "nag" flag "i"` returns `true`
+
+#### `starts with`
+
+The `starts with` predicate lets you check if one string is a prefix of another.
+
+**Syntax**
+
+```
+<string expression> starts with <prefix expression>
+```
+
+Where:
+
+1. `<string expression>` is a JsonPath expression with the string to check.
+2. `<prefix expression>` is a JsonPath expression with a prefix string.
+
+This means that the predicate will check that the `<string expression>` starts with the `<prefix expression>` string.
+
+**Execution**
+
+The first argument of the predicate must be a single string.
+
+The second argument of the predicate must be a sequence of (possibly, multiple) strings.
+
+For each element in a sequence of prefix strings:
+
+1. A check is made for whether "an element is a prefix of an input string"
+2. If the element isn't a string, the `ERROR` flag is set.
+3. If the check result is true, the `FOUND` flag is set.
+4. If either the `ERROR` or `FOUND` flag is set and the query is executed in `lax` mode, no more pairs are analyzed.
+
+If the pair analysis results in:
+
+1. Setting the `ERROR` flag, the predicate returns `null`
+2. Setting the `FOUND` flag, the predicate returns `true`
+3. Otherwise, the predicate returns `false`
+
+**Examples**
+
+1. `"James Holden" starts with "James"` returns `true`
+2. `"James Holden" starts with "Amos"` returns `false`
+
+#### `exists`
+
+The `exists` predicate lets you check whether a JsonPath expression returns at least one element.
+
+**Syntax**
+
+```
+exists (<expression>)
+```
+
+Where `<expression>` is the JsonPath expression to be checked. Parentheses around the expression are required.
+
+**Execution**
+
+1. The passed JsonPath expression is executed
+2. If an error occurs, the predicate returns `null`
+3. If an empty sequence is obtained as a result of the execution, the predicate returns `false`
+4. Otherwise, the predicate returns `true`
+
+**Examples**
+
+Let's take a JSON document:
+
+```json
+{
+ "profile": {
+ "name": "Josephus",
+ "surname": "Miller"
+ }
+}
+```
+
+1. `exists ($.profile.name)` returns `true`
+2. `exists ($.friends.profile.name)` returns `false`
+3. `strict exists ($.friends.profile.name)` returns `null`, because accessing non-existent object keys in `strict` mode is an error.
+
+#### `is unknown`
+
+The `is unknown` predicate lets you check if a Boolean value is `null`.
+
+**Syntax**
+
+```
+(<expression>) is unknown
+```
+
+Where `<expression>` is the JsonPath expression to be checked. Only expressions that return a Boolean value are allowed. Parentheses around the expression are required.
+
+**Execution**
+
+1. If the passed expression returns `null`, the predicate returns `true`
+2. Otherwise, the predicate returns `false`
+
+**Examples**
+
+1. `(1 == 2) is unknown` returns `false`. The `1 == 2` expression returned `false`, which is not `null`
+2. `(1 == "string") is unknown` returns `true`. The `1 == "string"` expression returned `null`, because strings and numbers can't be compared in JsonPath.
+
+### Filters
+
+JsonPath lets you filter values obtained during query execution.
+
An expression in a filter must return a Boolean value.
-Before filtering, the input sequence arrays are automatically unpacked.
-
-For each element of the input sequence:
-
-1. The value of the current filtered `@` object becomes equal to the current element of the input sequence.
-2. Executing the expression in the filter
-3. If an error occurs during the expression execution, the current element of the input sequence is skipped.
-4. If the expression execution result is the only `true` value, the current element is added to the filter result.
-
-**Example:**
-
-Suppose we have a JSON document describing the user's friends
-
-```json
-{
- "friends": [
- {
- "name": "James Holden",
- "age": 35,
- "money": 500
- },
- {
- "name": "Naomi Nagata",
- "age": 30,
- "money": 345
- }
- ]
-}
-```
-
-and we want to get a list of friends who are over 32 years old using a JsonPath query. To do this, you can write the following query:
-
-```
-$.friends ? (@.age > 32)
-```
-
-Let's analyze the query in parts:
-
-- `$.friends` accesses the `friends` array in the JSON document.
-- `? ( ... )` is the filter syntax. An expression inside the parentheses is called a predicate.
-- `` accesses the currently filtered object. In our example, it's the object describing a friend of the user.
-- `.age` accesses the `age` field of the currently filtered object.
-- `.age > 32` compares the `age` field with the value 32. As a result of the query, only the values for which this predicate returned true remain.
-
-The query only returns the first friend from the array of user's friends.
-
-Like many other JsonPath operators, filters can be arranged in chains. Let's take a more complex query that selects the names of friends who are older than 20 and have less than 400 currency units:
-
-```
-$.friends ? (@.age > 20) ? (@.money < 400) . name
-```
-
-Let's analyze the query in parts:
-
-- `$.friends` accesses the `friends` array in the JSON document.
-- `? (@.age > 20)` is the first filter. Since all friends are over 20, it just returns all the elements of the `friends` array.
-- `? (@.money < 400)` is the second filter. It only returns the second element of the `friends` array, since only its `money` field value is less than 400.
-- `.name` accesses the `name` field of filtered objects.
-
-The query returns a sequence of a single element: `"Naomi Nagata"`.
-
-In practice, it's recommended to combine multiple filters into one if possible. The above query is equivalent to `$.friends ? (@.age > 20 && @.money < 400) . name`.
-
-### Methods
-
-JsonPath supports methods that are functions converting one sequence of values to another. The syntax for calling a method is similar to accessing the object key:
-
-```
-$.friends.size()
-```
-
-Just like in the case of accessing object keys, method calls can be arranged in chains:
-
-```
-$.numbers.double().floor()
-```
-
-#### `type`
-
-The `type` method returns a string with the type of the passed value.
-
-For each element of the input sequence, the method adds this string to the output sequence according to the table below:
-
-| Value type | String with type |
-| ------------------ | ------------------------ |
-| Null | `"null"` |
-| Boolean value | `"boolean"` |
-| Number | `"number"` |
-| String | `"string"` |
-| Array | `"array"` |
-| Objects | `"object"` |
-
-**Examples**
-
-1. `"Naomi".type()` returns `"string"`
-2. `false.type()` returns `"boolean"`
-
-#### `size`
-
-The `size` method returns the size of the array.
-
-For each element of the input sequence, the method adds the following to the output sequence:
-
-1. The size of the array if the element type is an array.
-2. For all other types (including objects), it adds `1`
-
-**Examples**
-
-Let's take a JSON document:
-
-```json
-{
- "array": [1, 2, 3],
- "object": {
- "a": 1,
- "b": 2
- },
- "scalar": "string"
-}
-```
-
-And queries to it:
-
-1. `$.array.size()` returns `3`
-2. `$.object.size()` returns `1`
-3. `$.scalar.size()` returns `1`
-
-#### `Double`
-
-The `double` method converts strings to numbers.
-
-Before its execution, the input sequence arrays are automatically unpacked.
-
-All elements in the input sequence must be strings that contain decimal numbers. It's allowed to specify the fractional part and exponent.
-
-**Examples**
-
-1. `"125".double()` returns `125`
-2. `"125.456".double()` returns `125.456`
-3. `"125.456e-3".double()` returns `0.125456`
-
-#### `ceiling`
-
-The `ceiling` method rounds up a number.
-
-Before its execution, the input sequence arrays are automatically unpacked.
-
-All elements in the input sequence must be numbers.
-
-**Examples**
-
-1. `(1.3).ceiling()` returns `2`
-2. `(1.8).ceiling()` returns `2`
-3. `(1.5).ceiling()` returns `2`
-4. `(1.0).ceiling()` returns `1`
-
-#### `floor`
-
-The `floor` method rounds down a number.
-
-Before its execution, the input sequence arrays are automatically unpacked.
-
-All elements in the input sequence must be numbers.
-
-**Examples**
-
-1. `(1.3).floor()` returns `1`
-2. `(1.8).floor()` returns `1`
-3. `(1.5).floor()` returns `1`
-4. `(1.0).floor()` returns `1`
-
-#### `abs`
-
-The `abs` method calculates the absolute value of a number (removes the sign).
-
-Before its execution, the input sequence arrays are automatically unpacked.
-
-All elements in the input sequence must be numbers.
-
-**Examples**
-
-1. `(0.0).abs()` returns `0`
-2. `(1.0).abs()` returns `1`
-3. `(-1.0).abs()` returns `1`
-
-#### `keyvalue`
-
-The `keyvalue` method converts an object to a sequence of key-value pairs.
-
-Before its execution, the input sequence arrays are automatically unpacked.
-
-All elements in the input sequence must be objects.
-
-For each element of the input sequence:
-
-1. Each key-value pair in the element is analyzed.
-2. For each key-value pair, an object is generated with the keys `name` and `value`
-3. `name` stores a string with the name of the key from the pair.
-4. `value` stores the value from the pair.
-5. All objects for this element are added to the output sequence.
-
-**Examples**
-
-Let's take a JSON document:
-
-```json
-{
- "name": "Chrisjen",
- "surname": "Avasarala",
- "age": 70
-}
-```
-
-The `$.keyvalue()` query returns the following sequence for it:
-
-```json
-{
- "name": "age",
- "value": 70
-},
-{
- "name": "name",
- "value": "Chrisjen"
-},
-{
- "name": "surname",
- "value": "Avasarala"
-}
-```
-
-### Variables
-
-Functions using JsonPath can pass values into a query. They are called variables. To access a variable, write the `$` character and the variable name: `$variable`.
-
-**Example:**
-
-Let the `planet` variable be equal to
-
-```json
-{
- "name": "Mars",
- "gravity": 0.376
-}
-```
-
-Then the `strict $planet.name` query returns `"Mars"`.
-
-Unlike many programming languages, JsonPath doesn't support creating new variables or modifying existing ones.
-
-## Common arguments
-
-All functions for JSON accept:
-
-1. A JSON value (can be an arbitrary `Json` or `Json?` expression)
-2. A JsonPath query (must be explicitly specified with a string literal)
-3. **(Optional)** `PASSING` section
-
-### PASSING section
-
-Lets you pass values to a JsonPath query as variables.
-
-**Syntax:**
-
-```yql
-PASSING
- <expression 1> AS <variable name 1>,
- <expression 2> AS <variable name 2>,
- ...
-```
-
-`<expression>` can have the following types:
-
-- Numbers, `Date`, `DateTime`, and `Timestamp` (a `CAST` into `Double` will be made before passing a value to JsonPath)
-- `Utf8`, `Bool`, and `Json`
-
-You can set a `<variable name>` in several ways:
-
-- As an SQL name like `variable`
-- In quotes, for example, `"variable"`
-
-**Example:**
-
-```yql
-JSON_VALUE(
- $json,
- "$.timestamp - $Now + $Hour"
- PASSING
- 24 * 60 as Hour,
- CurrentUtcTimestamp() as "Now"
-)
-```
-
-## JSON_EXISTS
-
-The `JSON_EXISTS` function checks if a JSON value meets the specified JsonPath.
-
-**Syntax:**
-
-```yql
-JSON_EXISTS(
- <JSON expression>,
- <JsonPath query>,
- [<PASSING clause>]
- [{TRUE | FALSE | UNKNOWN | ERROR} ON ERROR]
-)
-```
-
-**Return value:** `Bool?`
-
-**Default value:** If the `ON ERROR` section isn't specified, the used section is `FALSE ON ERROR`
-
-**Behavior:**
-
-1. If `<JSON expression>` is `NULL` or an empty `Json?`, it returns an empty `Bool?`
-2. If an error occurs during JsonPath execution, the returned value depends on the `ON ERROR` section:
- - `TRUE`: Return `True`
- - `FALSE`: Return `False`
- - `UNKNOWN`: Return an empty `Bool?`
- - `ERROR`: Abort the entire query
-3. If the result of JsonPath execution is one or more values, the return value is `True`.
-4. Otherwise, `False` is returned.
-
-**Examples:**
-
-```yql
-$json = CAST(@@{
- "title": "Rocinante",
- "crew": [
- "James Holden",
- "Naomi Nagata",
- "Alex Kamai",
- "Amos Burton"
- ]
-}@@ as Json);
-
-SELECT
- JSON_EXISTS($json, "$.title"), -- True
- JSON_EXISTS($json, "$.crew[*]"), -- True
- JSON_EXISTS($json, "$.nonexistent"); -- False, as JsonPath returns an empty result.
-
-SELECT
- -- JsonPath error, False is returned because the default section used is FALSE ON ERROR.
- JSON_EXISTS($json, "strict $.nonexistent");
-
-SELECT
- -- JsonPath error, the entire YQL query fails.
- JSON_EXISTS($json, "strict $.nonexistent" ERROR ON ERROR);
-```
-
-## JSON_VALUE
-
-The `JSON_VALUE` function retrieves a scalar value from JSON (anything that isn't an array or object).
-
-**Syntax:**
-
-```yql
-JSON_VALUE(
- <JSON expression>,
- <JsonPath query>,
- [<PASSING clause>]
- [RETURNING <type>]
- [{ERROR | NULL | DEFAULT <expr>} ON EMPTY]
- [{ERROR | NULL | DEFAULT <expr>} ON ERROR]
-)
-```
-
-**Return value:** `<type>?`
-
-**Default values:**
-
-1. If the `ON EMPTY` section isn't specified, the section used is `NULL ON EMPTY`
-2. If the `ON ERROR` section isn't specified, the section used is `NULL ON ERROR`
-3. If the `RETURNING` section isn't specified, then for `<type>`, the type used is `Utf8`
-
-**Behavior:**
-
-1. If `<JSON expression>` is `NULL` or an empty `Json?`, it returns an empty `<type>?`
-2. If an error occurs, the returned value depends on the `ON ERROR` section:
- - `NULL`: Return an empty `<type>?`
- - `ERROR`: Abort the entire query
- - `DEFAULT <expr>`: Return `<expr>` after running the `CAST` function to convert the data type to `<type>?`. If the `CAST` fails, the entire query fails, too.
-3. If the JsonPath execution result is empty, the returned value depends on the `ON EMPTY` section:
- - `NULL`: Return an empty `<type>?`
- - `ERROR`: Abort the entire query
- - `DEFAULT <expr>`: Return `<expr>` after running the `CAST` function to convert the data type to `<type>?`. If the `CAST` fails, the behavior matches the `ON ERROR` section.
-4. If the result of JsonPath execution is a single value, then:
- - If the `RETURNING` section isn't specified, the value is converted to `Utf8`.
- - Otherwise, the `CAST` function is run to convert the value to `<type>`. If the `CAST` fails, the behavior matches the `ON ERROR` section. In this case, the value from JSON must match the `<type>` type.
-5. Return the result
-
-Correlation between JSON and YQL types:
-
-- JSON Number: Numeric types, `Date`, `DateTime`, and `Timestamp`
-- JSON Bool: `Bool`
-- JSON String: `Utf8` and `String`
-
-Errors executing `JSON_VALUE` are as follows:
-
-- Errors evaluating JsonPath
-- The result of JsonPath execution is a number of values or a non-scalar value.
-- The type of value returned by JSON doesn't match the expected one.
-
-`The RETURNING` section supports such types as numbers, `Date`, `DateTime`, `Timestamp`, `Utf8`, `String`, and `Bool`.
-
-**Examples:**
-
-```yql
-$json = CAST(@@{
- "friends": [
- {
- "name": "James Holden",
- "age": 35
- },
- {
- "name": "Naomi Nagata",
- "age": 30
- }
- ]
-}@@ as Json);
-
-SELECT
- JSON_VALUE($json, "$.friends[0].age"), -- "35" (type Utf8?)
- JSON_VALUE($json, "$.friends[0].age" RETURNING Uint64), -- 35 (type Uint64?)
- JSON_VALUE($json, "$.friends[0].age" RETURNING Utf8); -- an empty Utf8? due to an error. The JSON's Number type doesn't match the string Utf8 type.
-
-SELECT
- -- "empty" (type String?)
- JSON_VALUE(
- $json,
- "$.friends[50].name"
- RETURNING String
- DEFAULT "empty" ON EMPTY
- );
-
-SELECT
- -- 20 (type Uint64?). The result of JsonPath execution is empty, but the
- -- default value from the ON EMPTY section can't be cast to Uint64.
- -- That's why the value from ON ERROR is used.
- JSON_VALUE(
- $json,
- "$.friends[50].age"
- RETURNING Uint64
- DEFAULT -1 ON EMPTY
- DEFAULT 20 ON ERROR
- );
-```
-
-## JSON_QUERY
-
-The `JSON_QUERY` function lets you retrieve arrays and objects from JSON.
-
-**Syntax:**
-
-```yql
-JSON_QUERY(
- <JSON expression>,
- <JsonPath query>,
- [<PASSING clause>]
- [WITHOUT [ARRAY] | WITH [CONDITIONAL | UNCONDITIONAL] [ARRAY] WRAPPER]
- [{ERROR | NULL | EMPTY ARRAY | EMPTY OBJECT} ON EMPTY]
- [{ERROR | NULL | EMPTY ARRAY | EMPTY OBJECT} ON ERROR]
-)
-```
-
-**Return value:** `Json?`
-
-**Default values:**
-
-1. If the `ON EMPTY` section isn't specified, the section used is `NULL ON EMPTY`
-2. If the `ON ERROR` section isn't specified, the section used is `NULL ON ERROR`
-3. If the `WRAPPER` section isn't specified, the section used is `WITHOUT WRAPPER`
-4. If the `WITH WRAPPER` section is specified but `CONDITIONAL` or `UNCONDITIONAL` is omitted, then the section used is `UNCONDITIONAL`
-
-**Behavior:**
-
-{% note info %}
-
-You can't specify the `WITH ... WRAPPER` and `ON EMPTY` sections at the same time.
-
-{% endnote %}
-
-1. If `<JSON expression>` is `NULL` or an empty `Json?`, it returns an empty `Json?`
-2. If the `WRAPPER` section is specified, then:
- - `WITHOUT WRAPPER` or `WITHOUT ARRAY WRAPPER`: Don't convert the result of JsonPath execution in any way.
- - `WITH UNCONDITIONAL WRAPPER` or `WITH UNCONDITIONAL ARRAY WRAPPER`: Wrap the result of JsonPath execution in an array.
- - `WITH CONDITIONAL WRAPPER` or `WITH CONDITIONAL ARRAY WRAPPER`: Wrap the result of JsonPath execution in an array if it isn't the only array or object.
-3. If the JsonPath execution result is empty, the returned value depends on the `ON EMPTY` section:
- - `NULL`: Return an empty `Json?`
- - `ERROR`: Abort the entire query
- - `EMPTY ARRAY`: Return an empty JSON array, `[]`
- - `EMPTY OBJECT`: Return an empty JSON object, `{}`
-4. If an error occurs, the returned value depends on the `ON ERROR` section:
- - `NULL`: Return an empty `Json?`
- - `ERROR`: Abort the entire query
- - `EMPTY ARRAY`: Return an empty JSON array, `[]`
- - `EMPTY OBJECT`: Return an empty JSON object, `{}`
-5. Return the result
-
-Errors running a `JSON_QUERY`:
-
-- Errors evaluating JsonPath
-- The result of JsonPath execution is a number of values (even after using the `WRAPPER` section) or a scalar value.
-
-**Examples:**
-
-```yql
-$json = CAST(@@{
- "friends": [
- {
- "name": "James Holden",
- "age": 35
- },
- {
- "name": "Naomi Nagata",
- "age": 30
- }
- ]
-}@@ as Json);
-
-SELECT
- JSON_QUERY($json, "$.friends[0]"); -- {"name": "James Holden", "age": 35}
-
-SELECT
- JSON_QUERY($json, "$.friends.name" WITH UNCONDITIONAL WRAPPER); -- ["James Holden", "Naomi Nagata"]
-
-SELECT
- JSON_QUERY($json, "$.friends[0]" WITH CONDITIONAL WRAPPER), -- {"name": "James Holden", "age": 35}
- JSON_QUERY($json, "$.friends.name" WITH CONDITIONAL WRAPPER); -- ["James Holden", "Naomi Nagata"]
-```
-
+Before filtering, the input sequence arrays are automatically unpacked.
+
+For each element of the input sequence:
+
+1. The value of the current filtered `@` object becomes equal to the current element of the input sequence.
+2. Executing the expression in the filter
+3. If an error occurs during the expression execution, the current element of the input sequence is skipped.
+4. If the expression execution result is the only `true` value, the current element is added to the filter result.
+
+**Example:**
+
+Suppose we have a JSON document describing the user's friends
+
+```json
+{
+ "friends": [
+ {
+ "name": "James Holden",
+ "age": 35,
+ "money": 500
+ },
+ {
+ "name": "Naomi Nagata",
+ "age": 30,
+ "money": 345
+ }
+ ]
+}
+```
+
+and we want to get a list of friends who are over 32 years old using a JsonPath query. To do this, you can write the following query:
+
+```
+$.friends ? (@.age > 32)
+```
+
+Let's analyze the query in parts:
+
+- `$.friends` accesses the `friends` array in the JSON document.
+- `? ( ... )` is the filter syntax. An expression inside the parentheses is called a predicate.
+- `` accesses the currently filtered object. In our example, it's the object describing a friend of the user.
+- `.age` accesses the `age` field of the currently filtered object.
+- `.age > 32` compares the `age` field with the value 32. As a result of the query, only the values for which this predicate returned true remain.
+
+The query only returns the first friend from the array of user's friends.
+
+Like many other JsonPath operators, filters can be arranged in chains. Let's take a more complex query that selects the names of friends who are older than 20 and have less than 400 currency units:
+
+```
+$.friends ? (@.age > 20) ? (@.money < 400) . name
+```
+
+Let's analyze the query in parts:
+
+- `$.friends` accesses the `friends` array in the JSON document.
+- `? (@.age > 20)` is the first filter. Since all friends are over 20, it just returns all the elements of the `friends` array.
+- `? (@.money < 400)` is the second filter. It only returns the second element of the `friends` array, since only its `money` field value is less than 400.
+- `.name` accesses the `name` field of filtered objects.
+
+The query returns a sequence of a single element: `"Naomi Nagata"`.
+
+In practice, it's recommended to combine multiple filters into one if possible. The above query is equivalent to `$.friends ? (@.age > 20 && @.money < 400) . name`.
+
+### Methods
+
+JsonPath supports methods that are functions converting one sequence of values to another. The syntax for calling a method is similar to accessing the object key:
+
+```
+$.friends.size()
+```
+
+Just like in the case of accessing object keys, method calls can be arranged in chains:
+
+```
+$.numbers.double().floor()
+```
+
+#### `type`
+
+The `type` method returns a string with the type of the passed value.
+
+For each element of the input sequence, the method adds this string to the output sequence according to the table below:
+
+| Value type | String with type |
+| ------------------ | ------------------------ |
+| Null | `"null"` |
+| Boolean value | `"boolean"` |
+| Number | `"number"` |
+| String | `"string"` |
+| Array | `"array"` |
+| Objects | `"object"` |
+
+**Examples**
+
+1. `"Naomi".type()` returns `"string"`
+2. `false.type()` returns `"boolean"`
+
+#### `size`
+
+The `size` method returns the size of the array.
+
+For each element of the input sequence, the method adds the following to the output sequence:
+
+1. The size of the array if the element type is an array.
+2. For all other types (including objects), it adds `1`
+
+**Examples**
+
+Let's take a JSON document:
+
+```json
+{
+ "array": [1, 2, 3],
+ "object": {
+ "a": 1,
+ "b": 2
+ },
+ "scalar": "string"
+}
+```
+
+And queries to it:
+
+1. `$.array.size()` returns `3`
+2. `$.object.size()` returns `1`
+3. `$.scalar.size()` returns `1`
+
+#### `Double`
+
+The `double` method converts strings to numbers.
+
+Before its execution, the input sequence arrays are automatically unpacked.
+
+All elements in the input sequence must be strings that contain decimal numbers. It's allowed to specify the fractional part and exponent.
+
+**Examples**
+
+1. `"125".double()` returns `125`
+2. `"125.456".double()` returns `125.456`
+3. `"125.456e-3".double()` returns `0.125456`
+
+#### `ceiling`
+
+The `ceiling` method rounds up a number.
+
+Before its execution, the input sequence arrays are automatically unpacked.
+
+All elements in the input sequence must be numbers.
+
+**Examples**
+
+1. `(1.3).ceiling()` returns `2`
+2. `(1.8).ceiling()` returns `2`
+3. `(1.5).ceiling()` returns `2`
+4. `(1.0).ceiling()` returns `1`
+
+#### `floor`
+
+The `floor` method rounds down a number.
+
+Before its execution, the input sequence arrays are automatically unpacked.
+
+All elements in the input sequence must be numbers.
+
+**Examples**
+
+1. `(1.3).floor()` returns `1`
+2. `(1.8).floor()` returns `1`
+3. `(1.5).floor()` returns `1`
+4. `(1.0).floor()` returns `1`
+
+#### `abs`
+
+The `abs` method calculates the absolute value of a number (removes the sign).
+
+Before its execution, the input sequence arrays are automatically unpacked.
+
+All elements in the input sequence must be numbers.
+
+**Examples**
+
+1. `(0.0).abs()` returns `0`
+2. `(1.0).abs()` returns `1`
+3. `(-1.0).abs()` returns `1`
+
+#### `keyvalue`
+
+The `keyvalue` method converts an object to a sequence of key-value pairs.
+
+Before its execution, the input sequence arrays are automatically unpacked.
+
+All elements in the input sequence must be objects.
+
+For each element of the input sequence:
+
+1. Each key-value pair in the element is analyzed.
+2. For each key-value pair, an object is generated with the keys `name` and `value`.
+3. `name` stores a string with the name of the key from the pair.
+4. `value` stores the value from the pair.
+5. All objects for this element are added to the output sequence.
+
+**Examples**
+
+Let's take a JSON document:
+
+```json
+{
+ "name": "Chrisjen",
+ "surname": "Avasarala",
+ "age": 70
+}
+```
+
+The `$.keyvalue()` query returns the following sequence for it:
+
+```json
+{
+ "name": "age",
+ "value": 70
+},
+{
+ "name": "name",
+ "value": "Chrisjen"
+},
+{
+ "name": "surname",
+ "value": "Avasarala"
+}
+```
+
+### Variables
+
+Functions using JsonPath can pass values into a query. They are called variables. To access a variable, write the `$` character and the variable name: `$variable`.
+
+**Example:**
+
+Let the `planet` variable be equal to
+```json
+{
+ "name": "Mars",
+ "gravity": 0.376
+}
+```
+
+Then the `strict $planet.name` query returns `"Mars"`.
+
+Unlike many programming languages, JsonPath doesn't support creating new variables or modifying existing ones.
+
+## Common arguments
+
+All functions for JSON accept:
+
+1. A JSON value (can be an arbitrary `Json` or `Json?` expression)
+2. A JsonPath query (must be explicitly specified with a string literal)
+3. **(Optional)** `PASSING` section
+
+### PASSING section
+
+Lets you pass values to a JsonPath query as variables.
+
+**Syntax:**
+```yql
+PASSING
+ <expression 1> AS <variable name 1>,
+ <expression 2> AS <variable name 2>,
+ ...
+```
+
+`<expression>` can have the following types:
+
+- Numbers, `Date`, `DateTime`, and `Timestamp` (a `CAST` into `Double` will be made before passing a value to JsonPath)
+- `Utf8`, `Bool`, and `Json`
+
+You can set a `<variable name>` in several ways:
+
+- As an SQL name like `variable`
+- In quotes, for example, `"variable"`
+
+**Example:**
+```yql
+JSON_VALUE(
+ $json,
+ "$.timestamp - $Now + $Hour"
+ PASSING
+ 24 * 60 as Hour,
+ CurrentUtcTimestamp() as "Now"
+)
+```
+
+## JSON_EXISTS
+
+The `JSON_EXISTS` function checks if a JSON value meets the specified JsonPath.
+
+**Syntax:**
+```yql
+JSON_EXISTS(
+ <JSON expression>,
+ <JsonPath query>,
+ [<PASSING clause>]
+ [{TRUE | FALSE | UNKNOWN | ERROR} ON ERROR]
+)
+```
+
+**Return value:** `Bool?`
+
+**Default value:** If the `ON ERROR` section isn't specified, the used section is `FALSE ON ERROR`
+
+**Behavior:**
+
+1. If `<JSON expression>` is `NULL` or an empty `Json?`, it returns an empty `Bool?`
+2. If an error occurs during JsonPath execution, the returned value depends on the `ON ERROR` section:
+ - `TRUE`: Return `True`.
+ - `FALSE`: Return `False`.
+ - `UNKNOWN`: Return an empty `Bool?`.
+ - `ERROR`: Abort the entire query.
+3. If the result of JsonPath execution is one or more values, the return value is `True`.
+4. Otherwise, `False` is returned.
+
+**Examples:**
+
+```yql
+$json = CAST(@@{
+ "title": "Rocinante",
+ "crew": [
+ "James Holden",
+ "Naomi Nagata",
+ "Alex Kamai",
+ "Amos Burton"
+ ]
+}@@ as Json);
+
+SELECT
+ JSON_EXISTS($json, "$.title"), -- True
+ JSON_EXISTS($json, "$.crew[*]"), -- True
+ JSON_EXISTS($json, "$.nonexistent"); -- False, as JsonPath returns an empty result
+
+SELECT
+ -- JsonPath error, False is returned because the default section used is FALSE ON ERROR
+ JSON_EXISTS($json, "strict $.nonexistent");
+
+SELECT
+ -- JsonPath error, the entire YQL query fails.
+ JSON_EXISTS($json, "strict $.nonexistent" ERROR ON ERROR);
+```
+
+## JSON_VALUE
+
+The `JSON_VALUE` function retrieves a scalar value from JSON (anything that isn't an array or object).
+
+**Syntax:**
+``` yql
+JSON_VALUE(
+ <JSON expression>,
+ <JsonPath query>,
+ [<PASSING clause>]
+ [RETURNING <type>]
+ [{ERROR | NULL | DEFAULT <expr>} ON EMPTY]
+ [{ERROR | NULL | DEFAULT <expr>} ON ERROR]
+)
+```
+
+**Return value:** `<type>?`
+
+**Default values:**
+
+1. If the `ON EMPTY` section isn't specified, the section used is `NULL ON EMPTY`
+2. If the `ON ERROR` section isn't specified, the section used is `NULL ON ERROR`
+3. If the `RETURNING` section isn't specified, then for `<type>`, the type used is `Utf8`
+
+**Behavior:**
+
+1. If `<JSON expression>` is `NULL` or an empty `Json?`, it returns an empty `<type>?`
+2. If an error occurs, the returned value depends on the `ON ERROR` section:
+ - `NULL`: Return an empty `<type>?`
+ - `ERROR`: Abort the entire query
+ - `DEFAULT <expr>`: Return `<expr>` after running the `CAST` function to convert the data type to `<type>?`. If the `CAST` fails, the entire query fails, too.
+3. If the JsonPath execution result is empty, the returned value depends on the `ON EMPTY` section:
+ - `NULL`: Return an empty `<type>?`
+ - `ERROR`: Abort the entire query
+ - `DEFAULT <expr>`: Return `<expr>` after running the `CAST` function to convert the data type to `<type>?`. If the `CAST` fails, the behavior matches the `ON ERROR` section.
+4. If the result of JsonPath execution is a single value, then:
+ - If the `RETURNING` section isn't specified, the value is converted to `Utf8`.
+ - Otherwise, the `CAST` function is run to convert the value to `<type>`. If the `CAST` fails, the behavior matches the `ON ERROR` section. In this case, the value from JSON must match the `<type>` type.
+5. Return the result
+
+Correlation between JSON and YQL types:
+- JSON Number: Numeric types, `Date`, `DateTime`, and `Timestamp`
+- JSON Bool: `Bool`
+- JSON String: `Utf8` and `String`
+
+Errors executing `JSON_VALUE` are as follows:
+
+- Errors evaluating JsonPath
+- The result of JsonPath execution is a number of values or a non-scalar value.
+- The type of value returned by JSON doesn't match the expected one.
+
+`The RETURNING` section supports such types as numbers, `Date`, `DateTime`, `Timestamp`, `Utf8`, `String`, and `Bool`.
+
+**Examples:**
+``` yql
+$json = CAST(@@{
+ "friends": [
+ {
+ "name": "James Holden",
+ "age": 35
+ },
+ {
+ "name": "Naomi Nagata",
+ "age": 30
+ }
+ ]
+}@@ as Json);
+
+SELECT
+ JSON_VALUE($json, "$.friends[0].age"), -- "35" (type Utf8?)
+ JSON_VALUE($json, "$.friends[0].age" RETURNING Uint64), -- 35 (type Uint64?)
+ JSON_VALUE($json, "$.friends[0].age" RETURNING Utf8); -- an empty Utf8? due to an error. The JSON's Number type doesn't match the string Utf8 type.
+
+SELECT
+ -- "empty" (type String?)
+ JSON_VALUE(
+ $json,
+ "$.friends[50].name"
+ RETURNING String
+ DEFAULT "empty" ON EMPTY
+ );
+
+SELECT
+ -- 20 (type Uint64?). The result of JsonPath execution is empty, but the
+ -- default value from the ON EMPTY section can't be cast to Uint64.
+ -- That's why the value from ON ERROR is used.
+ JSON_VALUE(
+ $json,
+ "$.friends[50].age"
+ RETURNING Uint64
+ DEFAULT -1 ON EMPTY
+ DEFAULT 20 ON ERROR
+ );
+
+```
+
+## JSON_QUERY
+
+The `JSON_QUERY` function lets you retrieve arrays and objects from JSON.
+
+**Syntax:**
+``` yql
+JSON_QUERY(
+ <JSON expression>,
+ <JsonPath query>,
+ [<PASSING clause>]
+ [WITHOUT [ARRAY] | WITH [CONDITIONAL | UNCONDITIONAL] [ARRAY] WRAPPER]
+ [{ERROR | NULL | EMPTY ARRAY | EMPTY OBJECT} ON EMPTY]
+ [{ERROR | NULL | EMPTY ARRAY | EMPTY OBJECT} ON ERROR]
+)
+```
+
+**Return value:** `Json?`
+
+**Default values:**
+
+1. If the `ON EMPTY` section isn't specified, the section used is `NULL ON EMPTY`
+2. If the `ON ERROR` section isn't specified, the section used is `NULL ON ERROR`
+3. If the `WRAPPER` section isn't specified, the section used is `WITHOUT WRAPPER`
+4. If the `WITH WRAPPER` section is specified but `CONDITIONAL` or `UNCONDITIONAL` is omitted, then the section used is `UNCONDITIONAL`
+
+**Behavior:**
+
+{% note info %}
+
+You can't specify the `WITH ... WRAPPER` and `ON EMPTY` sections at the same time.
+
+{% endnote %}
+
+1. If `<JSON expression>` is `NULL` or an empty `Json?`, it returns an empty `Json?`
+2. If the `WRAPPER` section is specified, then:
+ - `WITHOUT WRAPPER` or `WITHOUT ARRAY WRAPPER`: Don't convert the result of JsonPath execution in any way.
+ - `WITH UNCONDITIONAL WRAPPER` or `WITH UNCONDITIONAL ARRAY WRAPPER`: Wrap the result of JsonPath execution in an array.
+ - `WITH CONDITIONAL WRAPPER` or `WITH CONDITIONAL ARRAY WRAPPER`: Wrap the result of JsonPath execution in an array if it isn't the only array or object.
+3. If the JsonPath execution result is empty, the returned value depends on the `ON EMPTY` section:
+ - `NULL`: Return an empty `Json?`
+ - `ERROR`: Abort the entire query
+ - `EMPTY ARRAY`: Return an empty JSON array, `[]`
+ - `EMPTY OBJECT`: Return an empty JSON object, `{}`
+4. If an error occurs, the returned value depends on the `ON ERROR` section:
+ - `NULL`: Return an empty `Json?`
+ - `ERROR`: Abort the entire query
+ - `EMPTY ARRAY`: Return an empty JSON array, `[]`
+ - `EMPTY OBJECT`: Return an empty JSON object, `{}`
+5. Return the result
+
+Errors running a `JSON_QUERY`:
+
+- Errors evaluating JsonPath
+- The result of JsonPath execution is a number of values (even after using the `WRAPPER` section) or a scalar value.
+
+**Examples:**
+``` yql
+$json = CAST(@@{
+ "friends": [
+ {
+ "name": "James Holden",
+ "age": 35
+ },
+ {
+ "name": "Naomi Nagata",
+ "age": 30
+ }
+ ]
+}@@ as Json);
+
+SELECT
+ JSON_QUERY($json, "$.friends[0]"); -- {"name": "James Holden", "age": 35}
+
+SELECT
+ JSON_QUERY($json, "$.friends.name" WITH UNCONDITIONAL WRAPPER); -- ["James Holden", "Naomi Nagata"]
+
+SELECT
+ JSON_QUERY($json, "$.friends[0]" WITH CONDITIONAL WRAPPER), -- {"name": "James Holden", "age": 35}
+ JSON_QUERY($json, "$.friends.name" WITH CONDITIONAL WRAPPER); -- ["James Holden", "Naomi Nagata"]
+```
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/list.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/list.md
index 2a56897615..b3e2b6982c 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/list.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/list.md
@@ -2,27 +2,25 @@
## ListCreate {#list-create}
-Construct an empty list. The only argument specifies a string describing the data type of the list cell, or the type itself obtained using [relevant functions](../types.md). YQL doesn't support lists with an unknown cell type.
+Construct an empty list. The only argument specifies a string describing the data type of the list cell or the type itself obtained using [relevant functions](../types.md). YQL doesn't support lists with an unknown cell type.
[Documentation for the type definition format](../../types/type_string.md).
**Examples**
-
-```yql
+``` yql
SELECT ListCreate(Tuple<String,Double?>);
```
-```yql
+``` yql
SELECT ListCreate(OptionalType(DataType("String")));
```
-## asList and AsListStrict {#aslist}
+## AsList and AsListStrict {#aslist}
Construct a list based on one or more arguments. The argument types must be compatible in the case of `AsList` and strictly match in the case of `AsListStrict`.
**Examples**
-
-```yql
+``` yql
SELECT AsList(1, 2, 3, 4, 5);
```
@@ -32,59 +30,48 @@ The count of items in the list.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT ListLength(list_column) FROM my_table;
```
-
{% endif %}
-
## ListHasItems
Check that the list contains at least one item.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT ListHasItems(list_column) FROM my_table;
```
-
{% endif %}
## ListCollect {#listcollect}
-Convert a lazy list (it can be built by such functions as [ListFilter](#listfilter), [ListMap](#listmap), [ListFlatMap](#listflatmap)) to an eager list. In contrast to a lazy list, where each new pass re-calculates the list contents, in an eager list the content is built at once by consuming more memory.
+Convert a lazy list (which can be built by such functions as [ListFilter](#listfilter), [ListMap](#listmap), and [ListFlatMap](#listflatmap)) to an eager list. In contrast to a lazy list, where each new pass re-calculates the list contents, in an eager list the content is built at once by consuming more memory.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT ListCollect(list_column) FROM my_table;
```
-
{% endif %}
-
-## ListSort, ListSortAsc, and ListSortDesc {#listsort}
+## ListSort, ListSortAsc and ListSortDesc {#listsort}
Sort the list. By default, the ascending sorting order is applied (`ListSort` is an alias for `ListSortAsc`).
Arguments:
1. List.
-2. An optional expression to get the sort key from a list element (it's the element itself by default).
+2. An optional expression to get the sort key from a list element (the element itself by default).
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT ListSortDesc(list_column) FROM my_table;
```
-
{% endif %}
-
-```yql
+``` yql
$list = AsList(
AsTuple("x", 3),
AsTuple("xx", 1),
@@ -105,21 +92,19 @@ The example used a [lambda function](../../syntax/expressions.md#lambda).
## ListExtend and ListExtendStrict {#listextend}
Sequentially join lists (concatenation of lists). The arguments can be lists, optional lists, and `NULL`.
-The types of list items must be compatible in the case of `ListExtend` and strictly match in the case of `ListExtendStrict`.
+The types of list elements must be compatible in the case of `ListExtend` and strictly match in the case of `ListExtendStrict`.
If at least one of the lists is optional, then the result is also optional.
If at least one argument is `NULL`, then the result type is `NULL`.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT ListExtend(
list_column_1,
list_column_2,
list_column_3
) FROM my_table;
```
-
{% endif %}
## ListUnionAll {#listunionall}
@@ -130,34 +115,30 @@ If at least one of the lists is optional, then the result is also optional.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT ListUnionAll(
list_column_1,
list_column_2,
list_column_3
) FROM my_table;
```
-
{% endif %}
## ListZip and ListZipAll {#listzip}
-Based on the input lists, build a list of pairs containing the list items with matching indexes (`List<Tuplefirst_list_element_type,second_list_element_type>`).
+Based on the input lists, build a list of pairs containing the list elements with matching indexes (`List<Tuplefirst_list_element_type,second_list_element_type>`).
-The length of the returned list is determined by the shortest list for ListZip and the longest list for ListZipAll.
-When the shorter list is exhausted, a `NULL` value of a relevant [optional type]( is paired with the elements of the longer list./../types/optional.md).
+The length of the returned list is determined by the shortest list for ListZip and the longest list for ListZipAll.
+When the shorter list is exhausted, a `NULL` value of a relevant [optional type](../../types/optional.md) is paired with the elements of the longer list.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ListZip(list_column_1, list_column_2, list_column_3),
ListZipAll(list_column_1, list_column_2)
FROM my_table;
```
-
{% endif %}
## ListEnumerate {#listenumerate}
@@ -166,11 +147,9 @@ Build a list of pairs (Tuple) containing the element number and the element itse
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT ListEnumerate(list_column) FROM my_table;
```
-
{% endif %}
## ListReverse {#listreverse}
@@ -179,11 +158,9 @@ Reverse the list.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT ListReverse(list_column) FROM my_table;
```
-
{% endif %}
## ListSkip {#listskip}
@@ -194,13 +171,11 @@ The first argument specifies the source list and the second argument specifies h
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ListSkip(list_column, 3)
FROM my_table;
```
-
{% endif %}
## ListTake {#listtake}
@@ -211,11 +186,9 @@ The first argument specifies the source list and the second argument specifies t
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT ListTake(list_column, 3) FROM my_table;
```
-
{% endif %}
## ListIndexOf {#listindexof}
@@ -224,16 +197,14 @@ Searches the list for an element with the specified value and returns its index
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ListIndexOf(list_column, 123)
FROM my_table;
```
-
{% endif %}
-## ListMap, ListFilter, and ListFlatMap {#listmap}
+## ListMap, ListFlatMap and ListFilter {#listmap}
Apply the function specified as the second argument to each list element. The functions differ in their returned result:
@@ -252,24 +223,22 @@ Arguments:
1. Source list.
2. Functions for processing list elements, such as:
* [Lambda function](../../syntax/expressions.md#lambda).
- * `Module::Function` - С++ UDF;
-{% if feature_udf_noncpp %}
- * [Python UDF](../../udf/python.md), [JavaScript UDF](../../udf/javascript.md) or any other called value.
+ * `Module::Function` - C++ UDF.
+{% if feature_udf_noncpp %}
+ * [Python UDF](../../udf/python.md), [JavaScript UDF](../../udf/javascript.md) or any other callable value.
If the source list is optional, then the output list is also optional.
**Examples**
{% if feature_column_container_type %}
-
-```yql
-$callable = Python::test(Callable<(Int64)->Bool>, "defMyFavouriteCrutchtest(i): return i % 2");
+``` yql
+$callable = Python::test(Callable<(Int64)->Bool>, "def test(i): return i % 2");
SELECT
ListMap(list_column, ($x) -> { RETURN $x > 2; }),
ListFlatMap(list_column, My::Udf),
ListFilter(list_column, $callable)
FROM my_table;
```
-
{% endif %}
{% endif %}
@@ -280,21 +249,19 @@ Applies transformation to the source list, skipping empty optional items and str
If the source list is optional, then the output list is also optional.
**Examples**
-
-```yql
+``` yql
SELECT ListNotNull([1,2]), -- [1,2]
ListNotNull([3,null,4]); -- [3,4]
```
## ListFlatten {#listflatten}
-Expands the list of lists into a flat list, preserving the order of items. As the top-level list item you can use an optional list that is interpreted as an empty list in the case of `NULL`.
+Expands the list of lists into a flat list, preserving the order of items. As the top-level list item, you can use an optional list that is interpreted as an empty list in the case of `NULL`.
If the source list is optional, then the output list is also optional.
**Examples**
-
-```yql
+``` yql
SELECT ListFlatten([[1,2],[3,4]]), -- [1,2,3,4]
ListFlatten([null,[3,4],[5,6]]); -- [3,4,5,6]
```
@@ -305,18 +272,16 @@ Returns a copy of the list containing only distinct elements.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ListUniq(list_column)
FROM my_table;
```
-
{% endif %}
## ListAny and ListAll {#listany}
-Returns `true` for a list of Boolean values, if:
+Returns `true` for a list of Boolean values if:
* `ListAny`: At least one element is `true`.
* `ListAll`: All elements are `true`.
@@ -325,14 +290,12 @@ Otherwise, it returns false.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ListAll(bool_column),
ListAny(bool_column)
FROM my_table;
```
-
{% endif %}
## ListHas {#listhas}
@@ -341,13 +304,11 @@ Show whether the list contains the specified element.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ListHas(list_column, "my_needle")
FROM my_table;
```
-
{% endif %}
## ListHead, ListLast {#listheadlast}
@@ -356,14 +317,12 @@ Returns the first and last item of the list.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ListHead(numeric_list_column) AS head,
ListLast(numeric_list_column) AS last
FROM my_table;
```
-
{% endif %}
## ListMin, ListMax, ListSum and ListAvg {#listminy}
@@ -372,8 +331,7 @@ Apply the appropriate aggregate function to all elements of the numeric list.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ListMax(numeric_list_column) AS max,
ListMin(numeric_list_column) AS min,
@@ -381,12 +339,11 @@ SELECT
ListAvg(numeric_list_column) AS avg
FROM my_table;
```
-
{% endif %}
## ListFromRange {#listfromrange}
-Generate a sequence of numbers with the specified step. It's similar to `xrange` in Python 2, but additionally supports floats.
+Generate a sequence of numbers with the specified step. It's similar to `xrange` in Python 2, but additionally supports floating points.
Arguments:
@@ -398,14 +355,13 @@ Specifics:
* The end is not included, i.e. `ListFromRange(1,3) == AsList(1,2)`.
* The type for the resulting elements is selected as the broadest from the argument types. For example, `ListFromRange(1, 2, 0.5)` results in a `Double` list.
-* The list is "lazy", but if it's used incorrectly, it can still consume a lot of RAM.
+* The list is "lazy", but if used improperly, it can still consume lots of RAM.
* If the step is positive and the end is less than or equal to the start, the result list is empty.
* If the step is negative and the end is greater than or equal to the start, the result list is empty.
* If the step is neither positive nor negative (0 or NaN), the result list is empty.
**Examples**
-
-```yql
+``` yql
SELECT
ListFromRange(-2, 2), -- [-2, -1, 0, 1]
ListFromRange(2, 1, -0.5); -- [2.0, 1.5]
@@ -421,8 +377,7 @@ Required arguments:
2. Number of copies.
**Examples**
-
-```yql
+``` yql
SELECT ListReplicate(true, 3); -- [true, true, true]
```
@@ -433,14 +388,12 @@ You can set a separator as the second parameter.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ListConcat(string_list_column),
ListConcat(string_list_column, "; ")
FROM my_table;
```
-
{% endif %}
## ListExtract {#listextract}
@@ -449,21 +402,19 @@ For a list of structures, it returns a list of contained fields having the speci
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ListExtract(struct_list_column, "MyMember")
FROM my_table;
```
-
{% endif %}
## ListTakeWhile, ListSkipWhile {#listtakewhile}
`ListTakeWhile` returns a list from the beginning while the predicate is true, then the list ends.
-`ListSkipWhile` skips the list segment from the beginning while the predicate is true, then returns the rest of the list ignoring the predicate.
-`ListTakeWhileInclusive` returns a list from the beginning while the predicate is true. Then the list ends, but it also includes the item on which the stopping predicate triggered.
+`ListSkipWhile` skips the list segment from the beginning while the predicate is true, then returns the rest of the list disregarding the predicate.
+`ListTakeWhileInclusive` returns a list from the beginning while the predicate is true. Then the list ends, but it also includes the element that triggered the stopping predicate.
`ListSkipWhileInclusive` skips a list segment from the beginning while the predicate is true, then returns the rest of the list disregarding the predicate, but excluding the element that matched the predicate and starting with the next element after it.
Required arguments:
@@ -474,8 +425,7 @@ Required arguments:
If the input list is optional, then the result is also optional.
**Examples**
-
-```yql
+``` yql
$data = AsList(1, 2, 5, 1, 2, 7);
SELECT
@@ -497,48 +447,41 @@ Arguments:
2. [Aggregation factory](../basic.md#aggregationfactory).
**Examples**
-
-```yql
+``` yql
SELECT ListAggregate(AsList(1, 2, 3), AggregationFactory("Sum")); -- 6
```
## ToDict and ToMultiDict {#todict}
-Convert a list of tuples containing key-value pairs to a dictionary. In case of conflicting keys in the input list, `ToDict` leaves the first value and `ToMultiDict` builds a list of all the values.
+Convert a list of tuples containing key-value pairs to a dictionary. If there are conflicting keys in the input list, `ToDict` leaves the first value and `ToMultiDict` builds a list of all the values.
It means that:
-* `ToDict` converts `List<TupleK, V="">` to `Dict<K, V="">`
-* `ToMultiDict` converts `List<TupleK, V>` to `Dict<K, List<V>>`
+* `ToDict` converts `List<TupleK, V>` to `Dict<K, V>`
+* `ToMultiDict` converts `List<TupleK, V>` to `Dict<K, ListV>`
Optional lists are also supported, resulting in an optional dictionary.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ToDict(tuple_list_column)
FROM my_table;
```
-
{% endif %}
## ToSet {#toset}
-
-Converts a list to a dictionary where the keys are unique elements of this list, and values are omitted and have the type `Void`. For the `List<T>` list, the result type is `Dict<T, Void="">`.
+Converts a list to a dictionary where the keys are unique elements of this list, and values are omitted and have the type `Void`. For the `List<T>` list, the result type is `Dict<T, Void>`.
An optional list is also supported, resulting in an optional dictionary.
Inverse function: get a list of keys for the [DictKeys](../dict.md#dictkeys) dictionary.
**Examples**
{% if feature_column_container_type %}
-
-```yql
+``` yql
SELECT
ToSet(list_column)
FROM my_table;
```
-
{% endif %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/struct.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/struct.md
index 1b824272b7..0314eb64f2 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/struct.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/struct.md
@@ -10,7 +10,7 @@ Arguments:
2. Field name.
3. Default value.
-```yql
+``` yql
$struct = <|a:1|>;
SELECT
TryMember(
@@ -37,8 +37,7 @@ Arguments:
* All the other arguments must be named, each argument adds a new field and the argument's name is used as the field's name (as in [AsStruct](../basic.md#asstruct)).
**Examples**
-
-```yql
+``` yql
$struct = <|a:1|>;
SELECT
ExpandStruct(
@@ -61,8 +60,7 @@ Arguments:
3. Value of the new field.
**Examples**
-
-```yql
+``` yql
$struct = <|a:1|>;
SELECT
AddMember(
@@ -84,8 +82,7 @@ Arguments:
2. Field name.
**Examples**
-
-```yql
+``` yql
$struct = <|a:1, b:2|>;
SELECT
RemoveMember(
@@ -106,8 +103,7 @@ Arguments:
2. Field name.
**Examples**
-
-```yql
+``` yql
$struct = <|a:1, b:2|>;
SELECT
ForceRemoveMember(
@@ -128,8 +124,7 @@ Arguments:
2. List of field names.
**Examples**
-
-```yql
+``` yql
$struct = <|a:1, b:2, c:3|>;
SELECT
ChooseMembers(
@@ -150,8 +145,7 @@ Arguments:
2. List of field names.
**Examples**
-
-```yql
+``` yql
$struct = <|a:1, b:2, c:3|>;
SELECT
RemoveMembers(
@@ -172,8 +166,7 @@ Arguments:
2. List of field names.
**Examples**
-
-```yql
+``` yql
$struct = <|a:1, b:2, c:3|>;
SELECT
ForceRemoveMembers(
@@ -191,8 +184,7 @@ If the resulting field set contains duplicate values, an error is returned.
Arguments: two or more structures.
**Examples**
-
-```yql
+``` yql
$struct1 = <|a:1, b:2|>;
$struct2 = <|c:3|>;
SELECT
@@ -208,11 +200,10 @@ Combining the fields from multiple new structures into another new structure wit
If the resulting field set contains duplicate values, an error is returned.
-Arguments: two or more tuples of two items: prefix and structure.
+Arguments: two or more tuples of two elements: prefix and structure.
**Examples**
-
-```yql
+``` yql
$struct1 = <|a:1, b:2|>;
$struct2 = <|c:3|>;
SELECT
@@ -229,8 +220,7 @@ Returns an unordered list of field names (possibly removing one Optional level)
Argument: structure
**Examples**
-
-```yql
+``` yql
$struct = <|a:1, b:2|>;
SELECT
StructMembers($struct); -- ['a', 'b']
@@ -246,8 +236,7 @@ Arguments:
2. A tuple of field names: the original name, the new name.
**Examples**
-
-```yql
+``` yql
$struct = <|a:1, b:2|>;
SELECT
RenameMembers($struct, [('a', 'c'), ('a', 'e')]); -- (b:2, c:1, e:1)
@@ -263,8 +252,7 @@ Arguments:
2. A tuple of field names: the original name, the new name.
**Examples**
-
-```yql
+``` yql
$struct = <|a:1, b:2|>;
SELECT
ForceRenameMembers($struct, [('a', 'c'), ('d', 'e')]); -- (b:2, c:1)
@@ -272,13 +260,12 @@ SELECT
## GatherMembers {#gathermembers}
-Returns an unordered list of tuples including the field name and value. For the `NULL` argument, `EmptyList` is returned. It can be used only in the cases when the types of items in the structure are the same or compatible. Returns an optional list for an optional structure.
+Returns an unordered list of tuples including the field name and value. For the `NULL` argument, `EmptyList` is returned. It can be used only in the cases when the types of elements in the structure are the same or compatible. Returns an optional list for an optional structure.
Argument: structure
**Examples**
-
-```yql
+``` yql
$struct = <|a:1, b:2|>;
SELECT
GatherMembers($struct); -- [('a', 1), ('b', 2)]
@@ -286,7 +273,7 @@ SELECT
## SpreadMembers {#spreadmembers}
-Creates a structure with a specified list of fields and applies a specified list of edits to it in the format (field name, field value). All types of fields in the resulting structure are the same and equal to the type of values in the update list with added Optional (unless they are optional already). If the field wasn't mentioned among the list of updated fields, it's returned as `NULL`. Among all updates for a field, the latest one is written. If the update list is Optional or `NULL`, the result has the same type. If the list of edits includes a field that is not in the list of expected fields, an error is returned.
+Creates a structure with a specified list of fields and applies to it the specified list of updates in the format (field name, field value). All types of fields in the resulting structure are the same and equal to the type of values in the update list with added Optional (unless they are optional already). If the field wasn't mentioned among the list of updated fields, it's returned as `NULL`. Among all updates for a field, the latest one is written. If the update list is Optional or `NULL`, the result has the same type. If the list of edits includes a field that is not in the list of expected fields, an error is returned.
Arguments:
@@ -294,8 +281,7 @@ Arguments:
2. A list of all possible field names in the structure.
**Examples**
-
-```yql
+``` yql
SELECT
SpreadMembers([('a',1),('a',2)],['a','b']); -- (a: 2, b: null)
@@ -303,7 +289,7 @@ SELECT
## ForceSpreadMembers {#forcespreadmembers}
-Creates a structure with a specified list of fields and applies to it the specified list of updates in the format (field name, field value). All types of fields in the resulting structure are the same and equal to the type of values in the update list with added Optional (unless they are optional already). If the field wasn't mentioned among the list of updated fields, it's returned as `NULL`. Among all updates for a field, the latest one is written. If the update list is optional or equal to `NULL`, the result has the same type. If the list of updates includes a field that is not in the list of expected fields, this edit is ignored.
+Creates a structure with a specified list of fields and applies to it the specified list of updates in the format (field name, field value). All types of fields in the resulting structure are the same and equal to the type of values in the update list with added Optional (unless they are optional already). If the field wasn't mentioned among the list of updated fields, it's returned as `NULL`. Among all updates for a field, the latest one is written. If the update list is Optional or `NULL`, the result has the same type. If the list of updates includes a field that is not in the list of expected fields, this edit is ignored.
Arguments:
@@ -311,10 +297,8 @@ Arguments:
2. A list of all possible field names in the structure.
**Examples**
-
-```yql
+``` yql
SELECT
ForceSpreadMembers([('a',1),('a',2),('c',100)],['a','b']); -- (a: 2, b: null)
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/types.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/types.md
index bf04093c61..a5659b7963 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/types.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/types.md
@@ -9,8 +9,7 @@ Serializing a type {% if feature_codegen %} or a handle type{% endif %} to a hum
Building a type from a string with description. [Documentation for its format](../../types/type_string.md).
**Examples**
-
-```yql
+``` yql
SELECT FormatType(ParseType("List<Int32>")); -- List<int32>
```
@@ -19,12 +18,10 @@ SELECT FormatType(ParseType("List<Int32>")); -- List<int32>
Getting the type of value passed to the argument.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(TypeOf("foo")); -- String
```
-
-```yql
+``` yql
SELECT FormatType(TypeOf(AsTuple(1, 1u))); -- Tuple<Int32,Uint32>
```
@@ -35,8 +32,7 @@ Returns an instance of the specified type that can only be used to get the type
If this instance remains in the computation graph by the end of optimization, the operation fails.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(TypeOf(
InstanceOf(ParseType("Int32")) +
InstanceOf(ParseType("Double"))
@@ -48,8 +44,7 @@ SELECT FormatType(TypeOf(
Returns a type for [primitive data types](../../types/primitive.md) based on type name.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(DataType("Bool")); -- Bool
SELECT FormatType(DataType("Decimal","5","1")); -- Decimal(5,1)
```
@@ -59,8 +54,7 @@ SELECT FormatType(DataType("Decimal","5","1")); -- Decimal(5,1)
Adds the option to assign `NULL` to the passed type.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(OptionalType(DataType("Bool"))); -- Bool?
```
@@ -69,8 +63,7 @@ SELECT FormatType(OptionalType(DataType("Bool"))); -- Bool?
Builds a list type or stream type based on the passed element type.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(ListType(DataType("Bool"))); -- List<Bool>
```
@@ -79,8 +72,7 @@ SELECT FormatType(ListType(DataType("Bool"))); -- List<Bool>
Builds a dictionary type based on the passed key types (first argument) and value types (second argument).
**Examples**
-
-```yql
+``` yql
SELECT FormatType(DictType(
DataType("String"),
DataType("Double")
@@ -92,8 +84,7 @@ SELECT FormatType(DictType(
Builds the tuple type from the passed element types.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(TupleType(
DataType("String"),
DataType("Double"),
@@ -106,8 +97,7 @@ SELECT FormatType(TupleType(
Builds the structure type based on the passed element types. The standard syntax of named arguments is used to specify the element names.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(StructType(
DataType("Bool") AS MyBool,
ListType(DataType("String")) AS StringList
@@ -119,8 +109,7 @@ SELECT FormatType(StructType(
Returns the type of a variant based on the underlying type (structure or tuple).
**Examples**
-
-```yql
+``` yql
SELECT FormatType(VariantType(
ParseType("Struct<foo:Int32,bar:Double>")
)); -- Variant<'bar':Double,'foo':Int32>
@@ -131,8 +120,7 @@ SELECT FormatType(VariantType(
Returns the type of the [resource](../../types/special.md) based on the passed string label.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(ResourceType("Foo")); -- Resource<'Foo'>
```
@@ -145,8 +133,7 @@ Constructs the type of the called value using the following arguments:
3. All the next arguments of CallableType are treated as types of arguments of the callable value, but with a shift for two required arguments (for example, the third argument of the CallableType describes the type of the first argument in the callable value).
**Examples**
-
-```yql
+``` yql
SELECT FormatType(CallableType(
1, -- optional args count
DataType("Double"), -- result type
@@ -155,38 +142,34 @@ SELECT FormatType(CallableType(
)); -- Callable<(String,[Int64?])->Double>
```
-## GenericType, UnitType, and VoidType {#generictype}
+## GenericType, UnitType and VoidType {#generictype}
Return the same-name [special data types](../../types/special.md). They have no arguments because they are not parameterized.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(VoidType()); -- Void
```
## OptionalItemType, ListItemType and StreamItemType {#optionalitemtype}
-{% if feature_codegen %} If a type is passed to these functions, then they {% else %}Do{% endif %} the action reverse to [OptionalType](#optionaltype), [ListType](#listtype), and [StreamType](#streamtype): return the item type based on its container type.
+{% if feature_codegen %} If a type is passed to these functions, then they {% else %}Do{% endif %} the action reverse to [OptionalType](#optionaltype), [ListType](#listtype), and [StreamType](#streamtype): return the element type based on its container type.
{% if feature_codegen %}
-If a type handle is passed to these functions, then they do the action reverse to [OptionalTypeHandle](#optionaltypehandle), [ListTypeHandle](#listtypehandle), and [StreamTypeHandle](#streamtypehandle): they return the handle of the element type based on the type handle of its container. {% endif %}
+If a type handle is passed to these functions, then they do the action reverse to [OptionalTypeHandle](#optionaltypehandle), [ListTypeHandle](#listtypehandle), and [StreamTypeHandle](#streamtypehandle): they return the handle of the element type based on the type handle of its container.
+{% endif %}
**Examples**
-
-```yql
+``` yql
SELECT FormatType(ListItemType(
ParseType("List<Int32>")
)); -- Int32
```
-
{% if feature_codegen %}
-
-```yql
+``` yql
SELECT FormatType(ListItemType(
ParseTypeHandle("List<Int32>")
)); -- Int32
```
-
{% endif %}
## DictKeyType and DictPayloadType {#dictkeytype}
@@ -194,8 +177,7 @@ SELECT FormatType(ListItemType(
Returns the type of the key or value based on the dictionary type.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(DictKeyType(
ParseType("Dict<Int32,String>")
)); -- Int32
@@ -206,8 +188,7 @@ SELECT FormatType(DictKeyType(
Returns the tuple's element type based on the tuple type and the element index (index starts from zero).
**Examples**
-
-```yql
+``` yql
SELECT FormatType(TupleElementType(
ParseType("Tuple<Int32,Double>"), "1"
)); -- Double
@@ -218,8 +199,7 @@ SELECT FormatType(TupleElementType(
Returns the type of the structure element based on the structure type and element name.
**Examples**
-
-```yql
+``` yql
SELECT FormatType(StructMemberType(
ParseType("Struct<foo:Int32,bar:Double>"), "foo"
)); -- Int32
@@ -230,8 +210,7 @@ SELECT FormatType(StructMemberType(
`CallableResultType` returns the result type based on the type of the called value. `CallableArgumentType` returns the argument type based on the called value type and its index (index starts from zero).
**Examples**
-
-```yql
+``` yql
$callable_type = ParseType("(String,Bool)->Double");
SELECT FormatType(CallableResultType(
@@ -246,11 +225,11 @@ FormatType(CallableArgumentType(
{% if feature_codegen %}If a type is passed to this function, then it {% else %}Does{% endif %} an action reverse to [VariantType](#varianttype): it returns the underlying type based on the variant type.
{% if feature_codegen %}
-If a type handle is passed to this function, it does the action reverse to [VariantTypeHandle](#varianttypehandle): returns the handle of the underlying type based on the handle of the variant type. {% endif %}
+If a type handle is passed to this function, it does the action reverse to[VariantTypeHandle](#varianttypehandle): returns the handle of the underlying type based on the handle of the variant type.
+{% endif %}
**Examples**
-
-```yql
+``` yql
SELECT FormatType(VariantUnderlyingType(
ParseType("Variant<foo:Int32,bar:Double>")
)), -- Struct<'bar':Double,'foo':Int32>
@@ -258,10 +237,8 @@ FormatType(VariantUnderlyingType(
ParseType("Variant<Int32,Double>")
)); -- Tuple<Int32,Double>
```
-
{% if feature_codegen %}
-
-```yql
+``` yql
SELECT FormatType(VariantUnderlyingType(
ParseTypeHandle("Variant<foo:Int32,bar:Double>")
)), -- Struct<'bar':Double,'foo':Int32>
@@ -269,11 +246,9 @@ FormatType(VariantUnderlyingType(
ParseTypeHandle("Variant<Int32,Double>")
)); -- Tuple<Int32,Double>
```
-
{% endif %}
{% if feature_codegen %}
-
# Functions for data types during calculations
To work with data types during calculations, use handle types: these are [resources](../../types/special.md) that contain an opaque type definition. After constructing the type handle, you can revert to the regular type using the [EvaluateType](#evaluatetype) function. For debug purposes, you can convert a handle type to a string using the [FormatType](#formattype) function.
@@ -283,18 +258,15 @@ To work with data types during calculations, use handle types: these are [resour
Getting a type handle from the type passed to the argument.
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(TypeHandle(TypeOf("foo"))); -- String
```
-
## EvaluateType
Getting the type from the type handle passed to the argument. The function is evaluated before the start of the main calculation, as well as [EvaluateExpr](../basic.md#evaluate_expr_atom).
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(EvaluateType(TypeHandle(TypeOf("foo")))); -- String
```
@@ -303,8 +275,7 @@ SELECT FormatType(EvaluateType(TypeHandle(TypeOf("foo")))); -- String
Building a type handle from a string with description. [Documentation for its format](../../types/type_string.md).
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(ParseTypeHandle("List<Int32>")); -- List<int32>
```
@@ -313,8 +284,7 @@ SELECT FormatType(ParseTypeHandle("List<Int32>")); -- List<int32>
Getting the top-level type name from the type handle passed to the argument.
**Examples:**
-
-```yql
+``` yql
SELECT TypeKind(TypeHandle(TypeOf("foo"))); -- Data
SELECT TypeKind(ParseTypeHandle("List<Int32>")); -- List
```
@@ -324,8 +294,7 @@ SELECT TypeKind(ParseTypeHandle("List<Int32>")); -- List
Getting the name and parameters for a [primitive data type](../../types/primitive.md) from the primitive type handle passed to the argument. Reverse function: [DataTypeHandle](#datatypehandle).
**Examples:**
-
-```yql
+``` yql
SELECT DataTypeComponents(TypeHandle(TypeOf("foo"))); -- ["String"]
SELECT DataTypeComponents(ParseTypeHandle("Decimal(4,1)")); -- ["Decimal", "4", "1"]
```
@@ -335,8 +304,7 @@ SELECT DataTypeComponents(ParseTypeHandle("Decimal(4,1)")); -- ["Decimal", "4",
Constructing a handle for a [primitive data type](../../types/primitive.md) from its name and parameters passed to the argument as a list. Reverse function: [DataTypeComponents](#datatypecomponents).
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(DataTypeHandle(
AsList("String")
)); -- String
@@ -351,8 +319,7 @@ SELECT FormatType(DataTypeHandle(
Adds the option to assign `NULL` to the passed type handle.
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(OptionalTypeHandle(
TypeHandle(DataType("Bool"))
)); -- Bool?
@@ -363,8 +330,7 @@ SELECT FormatType(OptionalTypeHandle(
Builds a list type handle or stream type handle based on the passed element type handle.
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(ListTypeHandle(
TypeHandle(DataType("Bool"))
)); -- List<Bool>
@@ -375,8 +341,7 @@ SELECT FormatType(ListTypeHandle(
Constructs a handle for an empty list or dictionary.
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(EmptyListTypeHandle()); -- EmptyList
```
@@ -385,8 +350,7 @@ SELECT FormatType(EmptyListTypeHandle()); -- EmptyList
Getting a list of element type handles from the tuple type handle passed to the argument. Inverse function: [TupleTypeHandle](#tupletypehandle).
**Examples:**
-
-```yql
+``` yql
SELECT ListMap(
TupleTypeComponents(
ParseTypeHandle("Tuple<Int32, String>")
@@ -402,8 +366,7 @@ SELECT ListMap(
Building a tuple type handle from handles of element types passed as a list to the argument. Inverse function: [TupleTypeComponents](#tupletypecomponents).
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(
TupleTypeHandle(
AsList(
@@ -419,8 +382,7 @@ SELECT FormatType(
Getting a list of element type handles and their names from the structure type handle passed to the argument. Inverse function: [StructTypeHandle](#structtypehandle).
**Examples:**
-
-```yql
+``` yql
SELECT ListMap(
StructTypeComponents(
ParseTypeHandle("Struct<a:Int32, b:String>")
@@ -439,8 +401,7 @@ SELECT ListMap(
Building a structure type handle from handles of element types and names passed as a list to the argument. Inverse function: [StructTypeComponents](#structtypecomponents).
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(
StructTypeHandle(
AsList(
@@ -456,8 +417,7 @@ SELECT FormatType(
Getting a key-type handle and a value-type handle from the dictionary-type handle passed to the argument. Inverse function: [DictTypeHandle](#dicttypehandle).
**Examples:**
-
-```yql
+``` yql
$d = DictTypeComponents(ParseTypeHandle("Dict<Int32,String>"));
SELECT
@@ -470,8 +430,7 @@ SELECT
Building a dictionary-type handle from a key-type handle and a value-type handle passed to arguments. Inverse function: [DictTypeComponents](#dicttypecomponents).
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(
DictTypeHandle(
ParseTypeHandle("Int32"),
@@ -485,8 +444,7 @@ SELECT FormatType(
Getting the tag from the resource type handle passed to the argument. Inverse function: [ResourceTypeHandle](#resourcetypehandle).
**Examples:**
-
-```yql
+``` yql
SELECT ResourceTypeTag(ParseTypeHandle("Resource<foo>")); -- foo
```
@@ -495,8 +453,7 @@ SELECT ResourceTypeTag(ParseTypeHandle("Resource<foo>")); -- foo
Building a resource-type handle from the tag value passed to the argument. Inverse function: [ResourceTypeTag](#resourcetypetag).
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(ResourceTypeHandle("foo")); -- Resource<'foo'>
```
@@ -505,8 +462,7 @@ SELECT FormatType(ResourceTypeHandle("foo")); -- Resource<'foo'>
Getting the tag and the basic type from the decorated type handle passed to the argument. Inverse function: [TaggedTypeHandle](#taggedtypehandle).
**Examples:**
-
-```yql
+``` yql
$t = TaggedTypeComponents(ParseTypeHandle("Tagged<Int32,foo>"));
SELECT FormatType($t.Base), $t.Tag; -- Int32, foo
@@ -517,8 +473,7 @@ SELECT FormatType($t.Base), $t.Tag; -- Int32, foo
Constructing a decorated type handle based on the base type handle and the tag name passed in arguments. Inverse function: [TaggedTypeComponents](#taggedtypecomponents).
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(TaggedTypeHandle(
ParseTypeHandle("Int32"), "foo"
)); -- Tagged<Int32, 'foo'>
@@ -529,8 +484,7 @@ SELECT FormatType(TaggedTypeHandle(
Building a variant-type handle from the handle of the underlying type passed to the argument. Inverse function: [VariantUnderlyingType](#variantunderlyingtype).
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(VariantTypeHandle(
ParseTypeHandle("Tuple<Int32, String>")
)); -- Variant<Int32, String>
@@ -541,8 +495,7 @@ SELECT FormatType(VariantTypeHandle(
Constructing a handle for Void and Null types, respectively.
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(VoidTypeHandle()); -- Void
SELECT FormatType(NullTypeHandle()); -- Null
```
@@ -552,8 +505,7 @@ SELECT FormatType(NullTypeHandle()); -- Null
Getting the handle description for the type of callable value passed to the argument. Inverse function: [CallableTypeHandle](#callabletypehandle).
**Examples:**
-
-```yql
+``` yql
$formatArgument = ($x) -> {
return AsStruct(
FormatType($x.Type) as Type,
@@ -601,8 +553,7 @@ Constructing the type handle of the called value using the following arguments:
Inverse function: [CallableTypeComponents](#callabletypecomponents).
**Examples:**
-
-```yql
+``` yql
SELECT FormatType(
CallableTypeHandle(
ParseTypeHandle("String"),
@@ -620,11 +571,9 @@ SELECT FormatType(
Getting the number of arguments in a lambda function.
**Examples:**
-
-```yql
+``` yql
SELECT LambdaArgumentsCount(($x, $y)->($x+$y))
; -- 2
```
{% endif %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/aggregate.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/aggregate.md
index d17b684c66..60741f1cec 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/aggregate.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/aggregate.md
@@ -1,11 +1,10 @@
## Aggregate functions {#aggregate-functions}
All [aggregate functions](../../aggregation.md) can also be used as window functions.
-In this case, each row includes an aggregation result obtained on a set of rows from the[window frame](../../../syntax/window.md#frame).
+In this case, each row includes an aggregation result obtained on a set of rows from the [window frame](../../../syntax/window.md#frame).
-**Examples:*
-
-```yql
+**Examples:**
+``` yql
SELECT
SUM(int_column) OVER w1 AS running_total,
SUM(int_column) OVER w2 AS total,
@@ -14,4 +13,3 @@ WINDOW
w1 AS (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW),
w2 AS ();
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/first_last_value.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/first_last_value.md
index a3dc0c052b..f4214c8559 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/first_last_value.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/first_last_value.md
@@ -5,18 +5,16 @@ Access values from the first and last rows of the [window frame](../../../syntax
Optionally, `OVER` can be preceded by the additional modifier `IGNORE NULLS`. It changes the behavior of functions to the first or last __non-empty__ (i.e., non-`NULL`) value among the window frame rows. The antonym of this modifier is `RESPECT NULLS`: it's the default behavior that can be omitted.
**Examples**
-
-```yql
+``` yql
SELECT
FIRST_VALUE(my_column) OVER w
FROM my_table
WINDOW w AS (ORDER BY key);
```
-```yql
+``` yql
SELECT
LAST_VALUE(my_column) IGNORE NULLS OVER w
FROM my_table
WINDOW w AS (ORDER BY key);
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/intro.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/intro.md
index f1f627c3e9..d07d7ca595 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/intro.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/intro.md
@@ -1,4 +1,2 @@
# List of window functions in YQL
-
The syntax for calling window functions is detailed in a [separate article](../../../syntax/window.md).
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/lag_lead.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/lag_lead.md
index 334d448fed..1bc1cf901f 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/lag_lead.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/lag_lead.md
@@ -3,11 +3,9 @@
Accessing a value from a row in the [section](../../../syntax/window.md#partition) that lags behind (`LAG`) or leads (`LEAD`) the current row by a fixed number. The first argument specifies the expression to be accessed, and the second argument specifies the offset in rows. You may omit the offset. By default, the neighbor row is used: the previous or next, respectively (hence, 1 is assumed by default). For the rows having no neighbors at a given distance (for example `LAG(expr, 3)` `NULL` is returned in the first and second rows of the section.
**Examples**
-
-```yql
+``` yql
SELECT
int_value - LAG(int_value) OVER w AS int_value_diff
FROM my_table
WINDOW w AS (ORDER BY key);
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/rank_dense.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/rank_dense.md
index 88e66e32d0..9dab3a24a1 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/rank_dense.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/rank_dense.md
@@ -2,7 +2,7 @@
Number the groups of neighboring rows in the [section](../../../syntax/window.md#partition) that have the same expression value in the argument. `DENSE_RANK` numbers the groups one-by-one, and `RANK` skips `(N - 1)` values, with `N` being the number of rows in the previous group.
-If there is no argument, it uses the order specified in the `ORDER BY` section in the window definition.
+If there is no argument, it uses the order specified in the ORDER BY `section` in the window definition.
If the argument is omitted and `ORDER BY` is not specified, then all rows are considered equal to each other.
{% note info %}
@@ -12,18 +12,14 @@ Passing an argument to `RANK`/`DENSE_RANK` is a non-standard extension in YQL.
{% endnote %}
**Examples**
-
-```yql
+``` yql
SELECT
RANK(my_column) OVER w
FROM my_table
WINDOW w AS (ORDER BY key);
```
-
-```yql
+``` yql
SELECT
RANK() OVER w
FROM my_table
WINDOW w AS (ORDER BY my_column);
-
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/row_number.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/row_number.md
index 49c93db7fc..33ba59c6b1 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/row_number.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/row_number.md
@@ -3,11 +3,9 @@
Row number within a [partition](../../../syntax/window.md#partition). No arguments.
**Examples**
-
-```yql
+``` yql
SELECT
ROW_NUMBER() OVER w AS row_num
FROM my_table
WINDOW w AS (ORDER BY key);
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/session_state.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/session_state.md
index 241d78b744..6993f977d4 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/session_state.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/builtins/_includes/window/session_state.md
@@ -2,4 +2,3 @@
A non-standard window function `SessionState()` (without arguments) lets you get the session calculation status from [SessionWindow](../../../syntax/group_by.md#session-window) for the current row.
It's allowed only if `SessionWindow()` is present in the `PARTITION BY` section in the window definition.
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/begin.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/begin.md
index 0ee45fa2f3..ce9c0f9a0a 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/begin.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/begin.md
@@ -4,7 +4,7 @@ Performing an action without declaring it (anonymous action).
**Syntax**
-1. `BEGIN`;
+1. `BEGIN`.
1. List of top-level expressions.
1. `END DO`.
@@ -17,5 +17,4 @@ DO BEGIN
SELECT 1;
SELECT 2 -- here and in the previous example, you might omit ';' before END
END DO
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/define_do.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/define_do.md
index bdfdcb052c..c32db440e2 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/define_do.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/define_do.md
@@ -4,7 +4,7 @@ Specifies a named action that is a parameterizable block of multiple top-level e
**Syntax**
-1. `DEFINE ACTION`: action definition.
+1. `DEFINE ACTION`: Action definition.
1. [Action name](../../expressions.md#named-nodes) that will be used to access the defined action further in the query.
1. The values of parameter names are listed in parentheses.
1. `AS` keyword.
@@ -27,7 +27,7 @@ Executes an `ACTION` with the specified parameters.
{% if feature_mapreduce %} <!-- In fact, if user file system integration is supported in the product. YQL service over YDB may also be here. -->
-{% note info "Примечание" %}
+{% note info %}
In large queries, you can use separate files for action definition and include them to the main query using [EXPORT](../../export_import.md#export) + [IMPORT](../../export_import.md#import) so that instead of one long text you can have several logical parts that are easier to navigate. An important nuance: the `USE my_cluster;` directive in the import query does not affect behavior of actions declared in other files.
@@ -47,5 +47,4 @@ DO EMPTY_ACTION();
DO $hello_world(NULL);
DO $hello_world("John");
DO $hello_world(NULL, "Earth");
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/evaluate.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/evaluate.md
index 064a76fa44..471fcb10e2 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/evaluate.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/action/evaluate.md
@@ -3,18 +3,18 @@
`EVALUATE IF`: Executing an action depending on the condition. It's followed by:
1. Condition.
-2. [DO](#do) with the name and parameters of the action or an anonymous action.
-3. An optional `ELSE` followed by the second `DO` for a situation where the condition is not met.
+1. [DO](#do) with the name and parameters of the action or an anonymous action.
+1. An optional `ELSE` followed by the second `DO` for a situation where the condition is not met.
## EVALUATE FOR {#evaluate-for}
-`EVALUATE FOR`: Executing an action for each item in the list. It's followed by:
+`EVALUATE FOR`: Executing an action for each element in the list. It's followed by:
1. [A named expression](../../expressions.md#named-nodes) applied to each next element in the list.
-2. `IN` keyword.
-3. The above-declared named expression applied to the list the action is executed on.
-4. [DO](#do) with the name and parameters of an action or an anonymous action. In the parameters, you can use both the current element from the first paragraph and any named expressions declared above, including the list itself.
-5. An optional `ELSE` followed by the second `DO` for the situation when the list is empty.
+1. `IN` keyword.
+1. The above-declared named expression applied to the list the action is executed on.
+1. [DO](#do) with the name and parameters of an action or an anonymous action. In the parameters, you can use both the current element from the first paragraph and any named expressions declared above, including the list itself.
+1. An optional `ELSE` followed by the second `DO` for the situation when the list is empty.
**Examples**
@@ -65,12 +65,11 @@ EVALUATE FOR $pair IN $pairs
DO $copy_table($pair)
ELSE
DO EMPTY_ACTION (); -- you may omit this ELSE,
- -- do nothing is implied by default
+ -- do nothing is implied by default
```
-{% note info "Примечание" %}
+{% note info %}
Note that `EVALUATE` is run before the operation starts. Please also note that in `EVALUATE` you can't use [anonymous tables](../../select.md#temporary-tables).
-{% endnote %}
-
+{% endnote %} \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/alter_table.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/alter_table.md
index 506d4a12a7..06d47a4380 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/alter_table.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/alter_table.md
@@ -85,7 +85,7 @@ You can specify any column family parameters from the [`CREATE TABLE`](create_ta
## Changing additional table parameters {#additional-alter}
-Most of the table parameters in YDB described on the [описания таблицы]({{ concept_table }}) page can be changed with the ```ALTER``` command.
+Most of the table parameters in YDB described on the [table description]({{ concept_table }}) page can be changed with the ```ALTER``` command.
In general, the command to change any table parameter looks like this:
@@ -103,7 +103,7 @@ ALTER TABLE series SET (AUTO_PARTITIONING_BY_SIZE = DISABLED);
## Resetting additional table parameters {#additional-reset}
-Some table parameters in YDB listed on the [описания таблицы]({{ concept_table }}) page can be reset with the ```ALTER``` command.
+Some table parameters in YDB listed on the [table description]({{ concept_table }}) page can be reset with the ```ALTER``` command.
The command to reset the table parameter looks like this:
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/create_table.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/create_table.md
index ef615a0493..b4c5eb5f53 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/create_table.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/create_table.md
@@ -6,7 +6,7 @@ The table is created automatically during the first [INSERT INTO](insert_into.md
{% else %}
-The `CREATE TABLE` call creates a {% if concept_table %}[таблицу]({{ concept_table }}){% else %}table{% endif %} with the specified data schema{% if feature_map_tables %} and key columns (`PRIMARY KEY`){% endif %}. {% if feature_secondary_index == true %}It lets you define secondary indexes on the created table.{% endif %}
+The `CREATE TABLE` call creates a {% if concept_table %}[table]({{ concept_table }}){% else %}table{% endif %} with the specified data schema{% if feature_map_tables %} and key columns (`PRIMARY KEY`){% endif %}. {% if feature_secondary_index == true %}It lets you define secondary indexes on the created table.{% endif %}
CREATE TABLE table_name (
column1 type1,
@@ -62,7 +62,7 @@ PRIMARY KEY (b, a)
## Secondary indexes {#secondary_index}
-The INDEX construct is used to define a {% if concept_secondary_index %}[вторичного индекса]({{ concept_secondary_index }}){% else %}secondary index{% endif %} in a table:
+The INDEX construct is used to define a {% if concept_secondary_index %}[secondary index]({{ concept_secondary_index }}){% else %}secondary index{% endif %} in a table:
```sql
CREATE TABLE table_name (
@@ -112,7 +112,7 @@ WITH (
Here, key is the name of the parameter and value is its value.
-For a list of possible parameter names and their values, see [описания таблицы {{ backend_name }}]({{ concept_table }}).
+For a list of possible parameter names and their values, see [{{ backend_name }} table description]({{ concept_table }}).
For example, this code will create a table with enabled automatic partitioning by partition size and the preferred size of each partition is 512 MB:
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/declare/general.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/declare/general.md
index e4df7e1aad..07e843fb8b 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/declare/general.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/declare/general.md
@@ -15,13 +15,13 @@ DECLARE $named-node AS data_type;
1. `DECLARE` keyword.
1. `$named-node`: The name by which you can access the passed value. It must start with `$`.
1. `AS` keyword.
-1. `data_type` is the data type [represented as a string in the accepted format](../../../types/type_string.md).
+1. `data_type`: The data type [represented as a string in the accepted format](../../../types/type_string.md).
Only serializable data types are allowed:
* [Primitive types](../../../types/primitive.md).
-* [Optional types ](../../../types/optional.md).
-* [Containers ](../../../types/containers.md), except `Stream<Type>`.
+* [Optional types](../../../types/optional.md).
+* [Containers](../../../types/containers.md), except `Stream<Type>`.
* `Void` and `Null` are the supported [special types](../../../types/special.md).
**Example**
@@ -32,5 +32,4 @@ DECLARE $y AS String?;
DECLARE $z AS List<String>;
SELECT $x, $y, $z;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/export_import.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/export_import.md
index 7fa4876328..116b4cc550 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/export_import.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/export_import.md
@@ -12,13 +12,13 @@ Here's the mechanism for putting part of the query into a separate attached file
* `IMPORT my_library SYMBOLS $my_symbol1, $my_symbol2, ...;` makes the listed named expressions available for further use.
-{% note info "Примечание" %}
+{% note info %}
You can use the library to include [lambdas](../expressions.md#lambda), [actions](../action.md){% if feature_subquery %}, [named subqueries](../subquery.md){% endif %}, constants and expressions, but __not subqueries or aggregate functions__.
{% endnote %}
-{% note warning "Предупреждение" %}
+{% note warning %}
The file linked by the [PRAGMA Library](../pragma.md#library) must be attached to the query. __You can't use a [PRAGMA File](../pragma.md#file) for this purpose__.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/as.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/as.md
index 4da92fdd1f..6ed3562f3f 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/as.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/as.md
@@ -9,36 +9,32 @@ Can be used in the following scenarios:
{% if select_command != "SELECT STREAM" %}
**Examples:**
-```yql
+``` yql
SELECT key AS k FROM my_table;
```
-```yql
+``` yql
SELECT t.key FROM my_table AS t;
```
-```yql
+``` yql
SELECT
MyFunction(key, 123 AS my_optional_arg)
FROM my_table;
```
-
{% else %}
**Examples:**
-
-```yql
+``` yql
SELECT STREAM key AS k FROM my_stream;
```
-```yql
+``` yql
SELECT STREAM s.key FROM my_stream AS s;
```
-```yql
+``` yql
SELECT STREAM
MyFunction(key, 123 AS my_optional_arg)
FROM my_stream;
```
-
{% endif %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/between.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/between.md
index e5dd273936..482b9722f0 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/between.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/between.md
@@ -1,11 +1,10 @@
## BETWEEN {#between}
-Checking whether a value is in a range. It's equivalent to two conditions with `>=` and `<=` (range boundaries are included). Can be used with the `NOT` prefix to support inversion.
+Checking whether a value is in a range. It's equivalent to two conditions with `>=` and `<=` (range boundaries are included). Can be used with the `NOT` prefix to support inversion.
**Examples**
-```yql
+``` yql
SELECT * FROM my_table
WHERE key BETWEEN 10 AND 20;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/bitcast.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/bitcast.md
index 064bcb9a32..da08059551 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/bitcast.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/bitcast.md
@@ -3,8 +3,7 @@
Performs a bitwise conversion of an integer value to the specified integer type. The conversion is always successful, but may lose precision or high-order bits.
**Examples**
-
-```yql
+``` yql
SELECT
BITCAST(100000ul AS Uint32), -- 100000
BITCAST(100000ul AS Int16), -- -31072
@@ -12,4 +11,3 @@ SELECT
BITCAST(-1 AS Int16), -- -1
BITCAST(-1 AS Uint16); -- 65535
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/case.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/case.md
index 50ee8fd8cd..f94fb18a08 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/case.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/case.md
@@ -1,14 +1,16 @@
## CASE{#case}.
Conditional expressions and branching. It's similar to `if`, `switch` and ternary operators in the imperative programming languages.
-If the result of the `WHEN` expression is `true`, the value of the `CASE` expression becomes the result following the condition, and the rest of the `CASE` expression isn't calculated. If the condition is not met, all the `WHEN` clauses that follow are checked. If none of the `WHEN` clauses are met, the `CASE` value is assigned the result from the `ELSE` clause.
+If the result of the `WHEN` expression is `true`, the value of the `CASE` expression becomes the result
+following the condition, and the rest of the `CASE` expression isn't calculated. If the condition is not met,
+all the `WHEN` clauses that follow are checked. If
+none of the `WHEN` clauses are met, the `CASE` value is assigned the result from the `ELSE` clause.
The `ELSE` branch is mandatory in the `CASE` expression. Expressions in `WHEN` are checked sequentially, from top to bottom.
Since its syntax is quite sophisticated, it's often more convenient to use the built-in function [IF](../../../builtins/basic.md#if).
**Examples**
-
-```yql
+``` yql
SELECT
CASE
WHEN value > 0
@@ -27,4 +29,3 @@ SELECT
END
FROM my_table;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/cast.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/cast.md
index ca91cd368b..803a84b851 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/cast.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/cast.md
@@ -7,9 +7,8 @@ For structures and tuples, it deletes elements that are omitted in the target ty
For more information about casting rules, see [here](../../../types/cast.md).
{% endif %}
-{% include notitle [Десятичные типы](../../../_includes/decimal_args.md) %}
+{% include notitle [Decimal types](../../../_includes/decimal_args.md) %}
**Examples**
{% include [cast_examples](../../../_includes/cast_examples.md) %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/check-match.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/check-match.md
index 4de2fc8987..2db930bc12 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/check-match.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/check-match.md
@@ -1,6 +1,6 @@
## Matching a string by pattern {#check-match}
-`REGEXP` and `RLIKE` are aliases used to call [Hyperscan::Grep](../../../udf/list/hyperscan.md#grep). `MATCH`: Same for [Hyperscan::Match](../../../udf/list/hyperscan.md#match).
+`REGEXP` and `RLIKE` are aliases used to call [Hyperscan::Grep](../../../udf/list/hyperscan.md#grep). `MATCH`: same for [Hyperscan::Match](../../../udf/list/hyperscan.md#match).
`LIKE` works as follows:
@@ -9,15 +9,14 @@
* `_`: Exactly one of any character.
All other characters are literals that represent themselves.
* As opposed to `REGEXP`, `LIKE` must be matched exactly. For example, to search a substring, add `%` at the beginning and end of the pattern.
-* `ILIKE` is a case-insensitive version of `LIKE`.
+* `ILIKE` is a case-insensitive version of `LIKE`.
* If `LIKE` is applied to the key column of the sorted table and the pattern doesn't start with a special character, filtering by prefix drills down directly to the cluster level, which in some cases lets you avoid the full table scan. This optimization is disabled for `ILIKE`.
* To escape special characters, specify the escaped character after the pattern using the `ESCAPE '?'` keyword. Instead of `?` you can use any character except `%` and `_`. For example, if you use a question mark as an escape character, the expressions `?%`, `?_` and `??` will match their second character in the template: percent, underscore, and question mark, respectively. The escape character is undefined by default.
The most popular way to use the `LIKE` and `REGEXP` keywords is to filter a table using the statements with the `WHERE` clause. However, there are no restrictions on using templates in this context: you can use them in most of contexts involving strings, for example, with concatenation by using `||`.
**Examples**
-
-```yql
+``` yql
SELECT * FROM my_table
WHERE string_column REGEXP '\\d+';
-- the second slash is required because
@@ -25,7 +24,7 @@ WHERE string_column REGEXP '\\d+';
-- can accept C-escaped strings
```
-```yql
+``` yql
SELECT
string_column LIKE '___!_!_!_!!!!!!' ESCAPE '!'
-- searches for a string of exactly 9 characters:
@@ -35,11 +34,10 @@ SELECT
FROM my_table;
```
-```yql
+``` yql
SELECT * FROM my_table
WHERE key LIKE 'foo%bar';
-- would probably only physically scan the keys
-- starting with "foo", and then, among them,
-- will leave only those that end in "bar"
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/concatenation.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/concatenation.md
index bf77137627..877294c1e5 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/concatenation.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/concatenation.md
@@ -8,7 +8,6 @@ Don't confuse this operator with a logical "or": in SQL, it's denoted by the `OR
**Examples**
-```sql
+``` sql
SELECT "fo" || "o";
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/in.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/in.md
index f781814099..fc2795712d 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/in.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/in.md
@@ -2,9 +2,9 @@
Checking whether a value is inside of a set of values. It's logically equivalent to a chain of equality comparisons using `OR` but implemented more efficiently.
-{% note warning "Внимание" %}
+{% note warning "Warning" %}
-Unlike a similar keyword in Python, in YQL `IN ` **DOES NOT** searches for a substring inside a string. To search for a substring, use the function [String::Contains](../../../udf/list/string.md) or [LIKE/REGEXP](#like) mentioned above.
+Unlike a similar keyword in Python, in YQL `IN ` **DOES NOT** searches for a substring inside a string. To search for a substring, use the function [String::Contains](../../../udf/list/string.md) or [LIKE / REGEXP](#like) mentioned above.
{% endnote %}
@@ -14,27 +14,28 @@ Using the `COMPACT` hint forces the in-memory execution strategy: a hash table i
The `COMPACT` hint must be used with care. Since the hash table is built in-memory, the query may fail if the right part of `IN` contains many large or different elements.
-{% if feature_mapreduce %} Since YQL imposes a limit on the query size in bytes (it's about 1Mb), add large lists of values to your query by URLs and use the [ParseFile](../../../builtins/basic.md#parsefile) function.
+{% if feature_mapreduce %}
+Since YQL imposes a limit on the query size in bytes (it's about 1Mb), add large lists of values to your query by URLs and use the [ParseFile]( function./../../builtins/basic.md#parsefile).
{% endif %}
**Examples**
-```yql
+``` yql
SELECT column IN (1, 2, 3)
FROM my_table;
```
-```yql
+``` yql
SELECT * FROM my_table
WHERE string_column IN ("a", "b", "c");
```
-```yql
+``` yql
$foo = AsList(1, 2, 3);
SELECT 1 IN $foo;
```
-```yql
+``` yql
$values = (SELECT column + 1 FROM table);
SELECT * FROM my_table WHERE
-- filtering by an in-memory hash table for one_table
@@ -42,4 +43,3 @@ SELECT * FROM my_table WHERE
-- followed by LEFT ONLY JOIN with other_table
column2 NOT IN (SELECT other_column FROM other_table);
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-distinct-from.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-distinct-from.md
index c54862cef2..511623af52 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-distinct-from.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-distinct-from.md
@@ -2,7 +2,6 @@
Comparing of two values. Unlike the regular [comparison operators](#comparison-operators), NULLs are treated as equal to each other.
More precisely, the comparison is carried out according to the following rules:
-
1) The operators `IS DISTINCT FROM`/`IS NOT DISTINCT FROM` are defined for those and only for those arguments for which the operators `!=` and `=` are defined.
2) The result of `IS NOT DISTINCT FROM` is equal to the logical negation of the `IS DISTINCT FROM` result for these arguments.
3) If the result of the `==` operator is not equal to zero for some arguments, then it is equal to the result of the `IS NOT DISTINCT FROM` operator for the same arguments.
@@ -10,4 +9,3 @@ More precisely, the comparison is carried out according to the following rules:
5) The result of `IS NOT DISTINCT FROM` for an empty `Optional` or `NULL` and filled-in `Optional` or non-`Optional` value is `False`.
For values of composite types, these rules are used recursively.
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-null.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-null.md
index f8242bf2f4..a503359e01 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-null.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/is-null.md
@@ -4,8 +4,7 @@ Matching an empty value (`NULL`). Since `NULL` is a special value [equal to noth
**Examples**
-```yql
+``` yql
SELECT key FROM my_table
WHERE value IS NOT NULL;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/items-access.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/items-access.md
index 4ebbf175bc..1bacb876ee 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/items-access.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/items-access.md
@@ -3,7 +3,7 @@
For accessing the values inside containers:
* `Struct<>`, `Tuple<>` and `Variant<>`, use a **dot**. The set of keys (for the tuple and the corresponding variant — indexes) is known at the query compilation time. The key is **validated** before beginning the query execution.
-* `List<>` and `Dict<>`, use **square brackets**. The set of keys (set of indexes for keys) is known only at the query execution time. The key is **not validated** before beginning the query execution. If no value is found, an empty value (NULL) is returned
+* `List<>` and `Dict<>`, use **square brackets**. The set of keys (set of indexes for keys) is known only at the query execution time. The key is **not validated** before beginning the query execution. If no value is found, an empty value (NULL) is returned.
[Description and list of available containers](../../../types/containers.md).
@@ -11,7 +11,7 @@ When using this syntax to access containers within table columns, be sure to spe
**Examples**
-```yql
+``` yql
SELECT
t.struct.member,
t.tuple.7,
@@ -20,8 +20,7 @@ SELECT
FROM my_table AS t;
```
-```yql
+``` yql
SELECT
Sample::ReturnsStruct().member;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/lambda.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/lambda.md
index bb4d836725..08ffbaf363 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/lambda.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/lambda.md
@@ -12,7 +12,7 @@ One or more of the last lambda parameters can be marked with a question mark as
**Examples**
-```yql
+``` yql
$f = ($y) -> {
$prefix = "x";
RETURN $prefix || $y;
@@ -25,9 +25,8 @@ $h = ($x, $y?) -> ($x + ($y ?? 0));
SELECT $f("y"), $g("z"), $h(1), $h(2, 3); -- "xy", "xz", 1, 5
```
-```yql
+``` yql
-- if the lambda result is calculated by a single expression, then you can use a more compact syntax:
$f = ($x, $_) -> ($x || "suffix"); -- the second argument is not used
SELECT $f("prefix_", "whatever");
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/named-nodes.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/named-nodes.md
index 523d28251e..0bd8b5f036 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/named-nodes.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/named-nodes.md
@@ -3,48 +3,41 @@
Complex queries may be sophisticated, containing lots of nested levels and/or repeating parts. In YQL, you can use named expressions to assign a name to an arbitrary expression or subquery. Named expressions can be referenced in other expressions or subqueries. In this case, the original expression/subquery is actually substituted at point of use.
A named expression is defined as follows:
-
```
<named-expr> = <expression> | <subquery>;
```
-
Here `<named-expr>` consists of a $ character and an arbitrary non-empty identifier (for example, `$foo`).
If the expression on the right is a tuple, you can automatically unpack it by specifying several named expressions separated by commas on the left:
-
```
<named-expr1>, <named-expr2>, <named-expr3> ... = <expression-returning-tuple>;
```
-
In this case, the number of expressions must match the tuple size.
Each named expression has a scope. It starts immediately after the definition of a named expression and ends at the end of the nearest enclosed namescope (for example, at the end of the query or at the end of the body of the [lambda function](#lambda), [ACTION](../../action.md#define-action){% if feature_subquery %}, [SUBQUERY](../../subquery.md#define-subquery){% endif %}{% if feature_mapreduce %}, or the cycle [EVALUATE FOR](../../action.md#evaluate-for){% endif %}).
Redefining a named expression with the same name hides the previous expression from the current scope.
-If the named expression has never been used, a warning is issued. To avoid such a warning, use the underscore as the first character in the ID (for example, `$_foo`).
+If the named expression has never been used, a warning is issued. To avoid such a warning, use the underscore as the first character in the ID (for example `$_foo`).
The named expression `$_` is called an anonymous named expression and is processed in a special way: it works as if `$_` would be automatically replaced by `$_<some_uniq_name>`.
Anonymous named expressions are convenient when you don't need the expression value. For example, to fetch the second element from a tuple of three elements, you can write:
-
-```yql
+``` yql
$_, $second, $_ = AsTuple(1, 2, 3);
select $second;
```
An attempt to reference an anonymous named expression results in an error:
-
-```yql
+``` yql
$_ = 1;
select $_; --- error: Unable to reference anonymous name $_
export $_; --- An error: Can not export anonymous name $_
```
-
-{% if feature_mapreduce %} Moreover, you can't import a named expression with an anonymous alias:
-
-```yql
+{% if feature_mapreduce %}
+Moreover, you can't import a named expression with an anonymous alias:
+``` yql
import utils symbols $sqrt as $_; --- error: Can not import anonymous name $_
```
-
-{% endif %} Anonymous argument names are also supported for [lambda functions](#lambda), [ACTION](../../action.md#define-action){% if feature_subquery %}, [SUBQUERY](../../subquery.md#define-subquery){% endif %}{% if feature_mapreduce %}, and in [EVALUATE FOR](../../action.md#evaluate-for){% endif %}.
+{% endif %}
+Anonymous argument names are also supported for [lambda functions](#lambda), [ACTION](../../action.md#define-action){% if feature_subquery %}, [SUBQUERY](../../subquery.md#define-subquery){% endif %}{% if feature_mapreduce %}, and in [EVALUATE FOR](../../action.md#evaluate-for){% endif %}.
{% note info %}
@@ -54,7 +47,7 @@ If named expression substitution results in completely identical subgraphs in th
**Examples**
-```yql
+``` yql
$multiplier = 712;
SELECT
a * $multiplier, -- $multiplier is 712
@@ -67,7 +60,7 @@ SELECT
FROM abc_table;
```
-```yql
+``` yql
$intermediate = (
SELECT
value * value AS square,
@@ -80,12 +73,11 @@ INNER JOIN $intermediate AS b
ON a.value == b.square;
```
-```yql
+``` yql
$a, $_, $c = AsTuple(1, 5u, "test"); -- unpack a tuple
SELECT $a, $c;
```
-```yql
+``` yql
$x, $y = AsTuple($y, $x); -- swap expression values
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/operators.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/operators.md
index 36f0685055..879df86b4f 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/operators.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/operators.md
@@ -8,11 +8,11 @@ For the Decimal data type, bankers rounding is used (to the nearest even integer
**Examples**
-```yql
+``` yql
SELECT 2 + 2;
```
-```yql
+``` yql
SELECT 0.0 / 0.0;
```
@@ -25,7 +25,7 @@ The operators `=`, `==`, `!=`, `<>`, `>`, `<` are defined for:
**Examples**
-```yql
+``` yql
SELECT 2 > 1;
```
@@ -35,7 +35,7 @@ Use the operators `AND`, `OR`, `XOR` for logical operations on Boolean values (`
**Examples**
-```yql
+``` yql
SELECT 3 > 0 AND false;
```
@@ -45,12 +45,12 @@ Bitwise operations on numbers:
* `&`, `|`, `^`: AND, OR, and XOR, respectively. Don't confuse bitwise operations with the related keywords. The keywords `AND`, `OR`, and `XOR` are used * for Boolean values only*, but not for numbers.
* ` ~ `: A negation.
-* `<`, `>`: Left or right shifts.
-* `|<`, `>|`: Circular left or right shifts.
+* `<<`, `>>`: Left or right shifts.
+* `|<<`, `>>|`: Circular left or right shifts.
**Examples**
-```yql
+``` yql
SELECT
key << 10 AS key,
~value AS value
@@ -60,10 +60,11 @@ FROM my_table;
### Precedence and associativity of operators {#operator-priority}
Operator precedence determines the order of evaluation of an expression that contains different operators.
-For example, the expression `1 + 2 * 3` is evaluated as `1 + (2 * 3)` because the multiplication operator has a higher precedence than the addition operator.
+For example, the expression `1 + 2 * 3` is evaluated as `1 + (2 * 3)`
+because the multiplication operator has a higher precedence than the addition operator.
Associativity determines the order of evaluating expressions containing operators of the same type.
-For example, the expression `1 + 2 + 3` is evaluated as `(1 + 2) + 3` because the addition operator is left-associative.
+For example, the expression `1 + 2 + 3` is evaluated as `(1 + 2) + 3`, because the addition operator is left-associative.
On the other hand, the expression `a ?? b ?? c` is evaluated as `a ?? (b ?? c)` because the `??` operator is right-associative
The table below shows precedence and associativity of YQL operators.
@@ -71,7 +72,7 @@ The operators in the table are listed in descending order of precedence.
| Priority | Operator | Description | Associativity |
| --- | --- | --- | --- |
-| 1 | <code>a[], a.foo, a()</code> | Accessing a container item, calling a function | Left |
+| 1 | <code>a[], a.foo, a()</code> | Accessing a container element, calling a function | Left |
| 2 | <code>+a, -a, ~a, NOT a</code> | Unary operators: plus, minus, bitwise and logical negation | Right |
| 3 | <code>a &#124;&#124; b</code> | [String concatenation](#concatenation) | Left |
| 4 | <code>a*b, a/b, a%b</code> | Multiplication, division, remainder of division | Left |
@@ -84,4 +85,3 @@ The operators in the table are listed in descending order of precedence.
| 10 | <code>a XOR b</code> | Logical XOR | Left |
| 11 | <code>a AND b</code> | Logical AND | Left |
| 12 | <code>a OR b</code> | Logical OR | Left |
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/tables.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/tables.md
index 4a3747a4ac..bfff9de481 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/tables.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/expressions/tables.md
@@ -1,7 +1,6 @@
## Table expressions {#table-contexts}
A table expression is an expression that returns a table. Table expressions in YQL are as follows:
-
* Subqueries: `(SELECT key, subkey FROM T)`
* [Named subqueries](#named-nodes): `$foo = SELECT * FROM T;` (in this case, `$foo` is also a table expression)
{% if feature_subquery %}
@@ -9,13 +8,14 @@ A table expression is an expression that returns a table. Table expressions in Y
{% endif %}
Semantics of a table expression depends on the context where it is used. In YQL, table expressions can be used in the following contexts:
-
* Table context: after [FROM](../../select.md#from).
In this case, table expressions work as expected: for example, `$input = SELECT a, b, c FROM T; SELECT * FROM $input` returns a table with three columns.
The table context also occurs after [UNION ALL](../../select.md#unionall){% if feature_join %}, [JOIN](../../join.md#join){% endif %}{% if feature_mapreduce and process_command == "PROCESS" %}, [PROCESS](../../process.md#process), [REDUCE](../../reduce.md#reduce){% endif %};
* Vector context: after [IN](#in). In this context, the table expression must contain exactly one column (the name of this column doesn't affect the expression result in any way).
A table expression in a vector context is typed as a list (the type of the list element is the same as the column type in this case). Example: `SELECT * FROM T WHERE key IN (SELECT k FROM T1)`;
-* A scalar context arises _in all the other cases_. As in a vector context, a table expression must contain exactly one column, but the value of the table expression is a scalar, that is, an arbitrarily selected value of this column (if no rows are returned, the result is `NULL`). Example: `$count = SELECT COUNT(*) FROM T; SELECT * FROM T ORDER BY key LIMIT $count / 2`;
+* A scalar context arises _in all the other cases_. As in a vector context,
+a table expression must contain exactly one column, but the value of the table expression is a scalar,
+that is, an arbitrarily selected value of this column (if no rows are returned, the result is `NULL`). Example: `$count = SELECT COUNT(*) FROM T; SELECT * FROM T ORDER BY key LIMIT $count / 2`;
The order of rows in a table context, the order of elements in a vector context, and the rule for selecting a value from a scalar context (if multiple values are returned), aren't defined. This order also cannot be affected by `ORDER BY`: `ORDER BY` without `LIMIT` is ignored in table expressions with a warning, and `ORDER BY` with `LIMIT` defines a set of elements rather than the order within that set.
@@ -23,7 +23,7 @@ The order of rows in a table context, the order of elements in a vector context,
There is an exception to this rule. Named expression with [PROCESS](../../process.md#process), if used in a scalar context, behaves as in a table context:
-```yql
+``` yql
$input = SELECT 1 AS key, 2 AS value;
$process = PROCESS $input;
@@ -34,12 +34,11 @@ SELECT $process[0].key; -- that returns 1
SELECT FormatType(TypeOf($input)); -- throws an error: $input in a scalar context must contain one column
```
-
-{% note warning "Внимание" %}
+{% note warning "Warning" %}
A common error is to use an expression in a scalar context rather than a table context or vector context. For example:
-```yql
+``` yql
$dict = SELECT key, value FROM T1;
DEFINE SUBQUERY $merge_dict($table, $dict) AS
@@ -48,11 +47,12 @@ END DEFINE;
SELECT * FROM $merge_dict("Input", $dict); -- $dict is used in a scalar context in this case.
-- an error: exactly one column is expected in a scalar context
+
```
A correct notation in this case is:
-```yql
+``` yql
DEFINE SUBQUERY $dict() AS
SELECT key, value FROM T1;
END DEFINE;
@@ -68,4 +68,3 @@ SELECT * FROM $merge_dict("Input", $dict); -- $dict - is a subquery template (ra
{% endnote %}
{% endif %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_by.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_by.md
index 358f652b51..a6d1159bea 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_by.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_by.md
@@ -7,17 +7,17 @@ Converts rows in the source table using vertical unpacking of [containers](../..
For example:
* Source table:
-|[a, b, c]|1|
-| --- | --- |
-|[d]|2|
-|[]|3|
+ |[a, b, c]|1|
+ | --- | --- |
+ |[d]|2|
+ |[]|3|
* The table resulting from `FLATTEN BY` on the left column:
-|a|1|
-| --- | --- |
-|b|1|
-|c|1|
-|d|2|
+ |a|1|
+ | --- | --- |
+ |b|1|
+ |c|1|
+ |d|2|
{% if feature_column_container_type != true %}
@@ -65,7 +65,6 @@ This conversion can be convenient in the following cases:
`FLATTEN BY` interprets [optional data types](../../../types/optional.md) as lists of length 0 or 1. The table rows with `NULL` are skipped, and the column type changes to a similar non-optional type.
-`FLATTEN BY` makes only one conversion at a time, so use `FLATTEN LIST BY` or `FLATTEN OPTIONAL BY` on optional containers, for example, `Optional<List<String>>`.
-
-{% endnote %}
+`FLATTEN BY` makes only one conversion at a time, so use `FLATTEN LIST BY` or `FLATTEN OPTIONAL BY` on optional containers, for example,`Optional<List<String>>`.
+{% endnote %} \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_columns.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_columns.md
index b9ce21c63d..1f9ac2f0f5 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_columns.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_columns.md
@@ -16,5 +16,4 @@ FROM (
AsStruct(
false AS z)
) FLATTEN COLUMNS;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_other_db.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_other_db.md
index 3692fe89ef..4d2741ce55 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_other_db.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_other_db.md
@@ -1,8 +1,7 @@
### Analogs of FLATTEN BY in other DBMS {#flatten-other-dmb}
-* PostgreSQL: `unnest`
-* Hive: `LATERAL VIEW`
-* MongoDB: `unwind`
-* Google BigQuery: `FLATTEN`
-* ClickHouse: `ARRAY JOIN / arrayJoin`
-
+* PostgreSQL: `unnest`.
+* Hive: `LATERAL VIEW`.
+* MongoDB: `unwind`.
+* Google BigQuery: `FLATTEN`.
+* ClickHouse: `ARRAY JOIN / arrayJoin`. \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_type_by.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_type_by.md
index 0f4c5e5bea..4fda3a309b 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_type_by.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/flatten/flatten_type_by.md
@@ -40,5 +40,4 @@ SELECT * FROM (
"1;2;3" AS a,
AsList("x", "y", "z") AS b
) FLATTEN LIST BY (String::SplitToList(a, ";") as a, b);
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/compact.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/compact.md
index 99bad56ad9..949fc67fa8 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/compact.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/compact.md
@@ -5,8 +5,7 @@ Improves aggregation efficiency if the query author knows in advance that none o
Unlike the usual GROUP BY, the Map-side combiner stage and additional Reduce are disabled for each field with [DISTINCT](#distinct) aggregation.
**Example:**
-
-```yql
+``` yql
SELECT
key,
COUNT (DISTINCT value) AS count -- top 3 keys by the number of unique values
@@ -15,4 +14,3 @@ GROUP COMPACT BY key
ORDER BY count DESC
LIMIT 3;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/distinct.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/distinct.md
index 9070a7cb22..b9391c9013 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/distinct.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/distinct.md
@@ -10,7 +10,7 @@ Applying `DISTINCT` to calculated values is not currently implemented. For this
**Example**
-```sql
+``` sql
SELECT
key,
COUNT (DISTINCT value) AS count -- top 3 keys by the number of unique values
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general.md
index 9e646de5be..df88958c53 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general.md
@@ -3,9 +3,8 @@
Group the `SELECT` results by the values of the specified columns or expressions. `GROUP BY` is often combined with [aggregate functions](../../../builtins/aggregation.md) (`COUNT`, `MAX`, `MIN`, `SUM`, `AVG`) to perform calculations in each group.
**Syntax**
-
```sql
-SELECT -- In SELECT, you can use:
+SELECT -- In SELECT, you can use:
column1, -- key columns specified in GROUP BY
key_n, -- named expressions specified in GROUP BY
column1 + key_n, -- arbitrary non-aggregate functions on them
@@ -15,7 +14,7 @@ SELECT -- In SELECT, you can use:
FROM table
GROUP BY
column1, column2, ...,
- <expr> AS key_n -- When grouping by expression, you can set a name for it using AS,
+ <expr> AS key_n -- When grouping by expression, you can set a name for it using AS,
-- and use it in SELECT
```
@@ -45,22 +44,21 @@ GROUP BY key + key AS double_key;
```sql
SELECT
- double_key, -- OK: A key column
+ double_key, -- OK: A key column
COUNT(*) AS group_size, -- OK: COUNT(*)
- SUM(key + subkey) AS sum1, -- OK: An aggregate function
- CAST(SUM(1 + 2) AS String) AS sum2, -- OK: An aggregate function with a constant argument
- SUM(SUM(1) + key) AS sum3, -- ERROR: Nested aggregations are not allowed
- key AS k1, -- ERROR: Using a non-key column named key without aggregation
- key * 2 AS dk1, -- ERROR in YQL: using a non-key column named key without aggregation
+ SUM(key + subkey) AS sum1, -- OK: An aggregate function
+ CAST(SUM(1 + 2) AS String) AS sum2, -- OK: An aggregate function with a constant argument
+ SUM(SUM(1) + key) AS sum3, -- ERROR: Nested aggregations are not allowed
+ key AS k1, -- ERROR: Using a non-key column named key without aggregation
+ key * 2 AS dk1, -- ERROR in YQL: using a non-key column named key without aggregation
FROM my_table
GROUP BY
key * 2 AS double_key,
subkey as sk,
```
-{% note warning "Внимание" %}
+{% note warning %}
Specifying a name for a column or expression in `GROUP BY .. AS foo` it is an extension on top of YQL. Such a name becomes visible in `WHERE` despite the fact that filtering by `WHERE` is executed [before](../../select.md#selectexec) the grouping. For example, if the `T` table includes two columns, `foo` and `bar`, then the query `SELECT foo FROM T WHERE foo > 0 GROUP BY bar AS foo` would actually filter data by the `bar` column from the source table.
{% endnote %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general_stream.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general_stream.md
index 9667097c43..a93f68bfdd 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general_stream.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/general_stream.md
@@ -14,11 +14,9 @@ You can group by the result of calculating an arbitrary expression from the sour
Aggregate functions automatically skip `NULL` in their arguments.
Among the columns by which grouping is performed, make sure to use the `HOP` construct to define the time window for grouping.
-
-```yql
+``` yql
HOP(time_extractor, hop, interval, delay)
```
-
The implemented version of the time window is called the **hopping window**. This is a window that moves forward in discrete intervals (the `hop` parameter). The total duration of the window is set by the `interval` parameter. To determine the time of each input event, the `time_extractor` parameter is used. This expression depends only on the input values of the stream's columns and must have the `Timestamp` type. It indicates where exactly to get the time value from input events.
In each stream defined by the values of all the grouping columns, the window moves forward independently of other streams. Advancement of the window is totally dependent on the latest event of the stream. Since records in streams get somewhat mixed in time, the `delay` parameter has been added so you can delay the closing of the window by a specified period. Events arriving before the current window are ignored.
@@ -32,8 +30,7 @@ Functions with omitted `HOP_START` and `HOP_END` parameters, return a value of t
The **tumbling window** known in other systems is a special case of a **hopping window** when `interval` == `hop`.
**Examples:**
-
-```yql
+``` yql
SELECT STREAM
key,
COUNT(*)
@@ -46,7 +43,7 @@ GROUP BY
-- delay = 30 seconds
```
-```yql
+``` yql
SELECT STREAM
double_key,
HOP_END() as time,
@@ -54,6 +51,5 @@ SELECT STREAM
FROM my_stream
GROUP BY
key + key AS double_key,
- HOP(ts, "PT1М", "PT1M", "PT1M");
+ HOP(ts, "PT1M", "PT1M", "PT1M");
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having.md
index 5eca8c3171..62a9c816a2 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having.md
@@ -4,11 +4,10 @@ Filtering a `SELECT` based on the calculation results of [aggregate functions](.
**Example**
-```yql
+``` yql
SELECT
key
FROM my_table
GROUP BY key
HAVING COUNT(value) > 100;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having_stream.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having_stream.md
index a73539ba74..ff098a05db 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having_stream.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/having_stream.md
@@ -3,12 +3,10 @@
Filtering a `SELECT STREAM` based on the calculation results of [aggregate functions](../../../builtins/aggregation.md). The syntax is similar to [WHERE](../../select_stream.md#where).
**Examples:**
-
-```yql
+``` yql
SELECT STREAM
key
FROM my_table
GROUP BY key, HOP(ts, "PT1M", "PT1M", "PT1M")
HAVING COUNT(value) > 100;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/rollup_cube_sets.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/rollup_cube_sets.md
index 9ea6de7d64..4c063db4a5 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/rollup_cube_sets.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/rollup_cube_sets.md
@@ -20,14 +20,13 @@ GROUP BY
* `CUBE` groups the values for every possible combination of columns, generates the subtotals for each group and the overall total.
* `GROUPING SETS` sets the groups for subtotals.
-`You can combine ROLLUP`, `CUBE` and `GROUPING SETS`, separating them by commas.
+You can combine `ROLLUP`, `CUBE` and `GROUPING SETS`, separating them by commas.
### GROUPING {#grouping}
The values of columns not used in calculations are replaced with `NULL` in the subtotal. In the overall total, the values of all columns are replaced by `NULL`. `GROUPING`: A function that allows you to distinguish the source `NULL` values from the `NULL` values added while calculating subtotals and overall totals.
`GROUPING` returns a bit mask:
-
* `0`: If `NULL` is used for the original empty value.
* `1`: If `NULL` is added for a subtotal or overall total.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/session_window.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/session_window.md
index cf21102c3a..3cc4195485 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/session_window.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/group_by/session_window.md
@@ -16,10 +16,10 @@ GROUP BY user, SessionWindow(<time_expr>, <timeout_expr>) AS session_start
The following happens in this case:
1) The input table is partitioned by the grouping keys specified in `GROUP BY`, ignoring SessionWindow (in this case, it's based on `user`).
-If `GROUP BY` includes nothing more than SessionWindow, then the input table gets into one partition
+ If `GROUP BY` includes nothing more than SessionWindow, then the input table gets into one partition.
2) Each partition is split into disjoint subsets of rows (sessions).
-For this, the partition is sorted in the ascending order of the `time_expr` expression.
-The session limits are drawn between neighboring items of the partition, that differ in their `time_expr` values by more than `timeout_expr`
+ For this, the partition is sorted in the ascending order of the `time_expr` expression.
+ The session limits are drawn between neighboring elements of the partition, that differ in their `time_expr` values by more than `timeout_expr`.
3) The sessions obtained in this way are the final partitions on which aggregate functions are calculated.
The SessionWindow() key column (in the example, it's `session_start`) has the value "the minimum `time_expr` in the session".
@@ -31,11 +31,9 @@ An extended version of SessionWindow with four arguments is also supported:
`SessionWindow(<order_expr>, <init_lambda>, <update_lambda>, <calculate_lambda>)`
Where:
-
-* `<order_expr>`: An expression used to sort the source partition
-* `<init_lambda>`: A lambda function to initialize the state of session calculation. It has the signature `(TableRow())->State`. It's called once for the first (following the sorting order) element of the source partition
-* `<update_lambda>`: A lambda function to update the status of session calculation and define the session limits. It has the signature `(TableRow(), State)->Tuple<Bool, State>`. It's called for every item of the source partition, except the first one. The new value of state is calculated based on the current row of the table and the previous state. If the first item in the return tuple is `True`, then a new session starts from the _current_ row. The key of the new session is obtained by applying `<calculate_lambda>` to the second item in the tuple.
-* `<calculate_lambda>`: A lambda function for calculating the session key (the "value" of SessionWindow() that is also accessible via SessionStart()). The function has the signature `(TableRow(), State)->SessionKey`. It's called for the first item in the partition (after `<init_lambda>`) and those items for which `<update_lambda>` has returned `True` in the first item in the tuple. Please note that to start a new session, you should make sure that `<calculate_lambda>` has returned a value different from the previous session key. Sessions having the same keys are not merged. For example, if `<calculate_lambda>` returns the sequence `0, 1, 0, 1`, then there will be four different sessions.
+* `<order_expr>`: An expression used to sort the source partition.
+* `<init_lambda>`: A lambda function to initialize the state of session calculation. It has the signature `(TableRow())->State`. It's called once for the first (following the sorting order) element of the source partition.
+* `<update_lambda>`: A lambda function to update the status of session calculation and define the session limits. It has the signature `(TableRow(), State)->Tuple<Bool, State>`. It's called for every element of the source partition, except the first one. The new value of state is calculated based on the current row of the table and the previous state. If the first element in the return tuple is `True`, then a new session starts from the _current_ row. The key of the new session is obtained by applying `<calculate_lambda>` to the second element in the tuple.
+* `<calculate_lambda>`: A lambda function for calculating the session key (the "value" of SessionWindow() that is also accessible via SessionStart()). The function has the signature `(TableRow(), State)->SessionKey`. It's called for the first element in the partition (after `<init_lambda>`) and those elements for which `<update_lambda>` has returned `True` in the first element in the tuple. Please note that to start a new session, you should make sure that `<calculate_lambda>` has returned a value different from the previous session key. Sessions having the same keys are not merged. For example, if `<calculate_lambda>` returns the sequence `0, 1, 0, 1`, then there will be four different sessions.
You can use SessionWindow in GROUP BY only once.
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/join.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/join.md
index 250e4b4eb6..c4e39dacec 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/join.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/join.md
@@ -21,7 +21,7 @@ WHERE ...
At each JOIN step, rules are used to establish correspondences between rows in the left-hand and right-hand data selections, creating a new selection that includes every combination of rows that meet the JOIN conditions.
-{% note warning "Внимание" %}
+{% note warning %}
Since columns in YQL are identified by their names, and you can't have two columns with the same name in the selection, `SELECT * FROM ... JOIN ...` can't be executed if there are columns with identical names in the joined tables.
@@ -38,11 +38,11 @@ Since columns in YQL are identified by their names, and you can't have two colum
* `CROSS`: A full cartesian product of two tables without specifying key columns and no explicit `ON/USING`.
* `EXCLUSION`: Both sides minus the intersection.
-(../_assets/join-YQL-06.png)
+![](../_assets/join-YQL-06.png)
-{% note info "Примечание" %}
+{% note info %}
-`NULL` is a special value to denote nothing. Hence, `NULL` values on both sides are **НЕ** treated as equal to each other. This eliminates ambiguity in some types of `JOIN` and avoids a giant Cartesian product otherwise created.
+`NULL` is a special value to denote nothing. Hence, `NULL` values on both sides are **NOT** treated as equal to each other. This eliminates ambiguity in some types of `JOIN` and avoids a giant Cartesian product otherwise created.
{% endnote %}
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/debug.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/debug.md
index 8b7cb79647..c16aa22f1a 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/debug.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/debug.md
@@ -3,39 +3,37 @@
## Debugging and auxiliary settings {#debug}
{% if feature_webui %}
-
### `DirectRead`
| Value type | Default |
-| --- | --- |
-| Flag | false |
+| ---------- | ------- |
+| Flag | false |
An auxiliary setting for previewing tables in the [HTTP API](../../../interfaces/http.md) (both for the web interface and console client).
{% endif %}
### `config.flags("ValidateUdf", "Lazy")`
-| Value type | Default |
-| --- | --- |
-| String: None/Lazy/Greedy | None |
+| Value type | Default |
+| ------------------------ | ------- |
+| String: None/Lazy/Greedy | None |
Validating whether UDF results match the declared signature. The Greedy mode enforces materialization of lazy containers, although the Lazy mode doesn't.
### `{{ backend_name_lower }}.DefaultCluster`
-| Value type | Default |
-| --- | --- |
-| A string with the cluster name | hahn |
+| Value type | Default |
+| ------------------------------ | ------- |
+| A string with the cluster name | hahn |
Selecting a cluster for calculations that don't access tables.
### `config.flags("Diagnostics")`
| Value type | Default |
-| --- | --- |
-| Flag | false |
+| ---------- | ------- |
+| Flag | false |
Getting diagnostic information from YQL as an additional result of a query.
-{% endif %}
-
+{% endif %} \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/definition.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/definition.md
index dcc3cbe888..6b1810b588 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/definition.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/definition.md
@@ -14,15 +14,15 @@ Redefinition of settings.
**Examples**
-```yql
+``` yql
PRAGMA AutoCommit;
```
-```yql
+``` yql
PRAGMA TablePathPrefix = "home/yql";
```
-```yql
+``` yql
PRAGMA Warning("disable", "1101");
```
@@ -35,5 +35,4 @@ For the full list of available settings, [see the table below](#pragmas).
Unless otherwise specified, a pragma affects all the subsequent expressions up to the end of the module where it's used.
If necessary and logically possible, you can change the value of this setting several times within a given query to make it different at different execution steps.
There are also special scoped pragmas with the scope defined by the same rules as the scope of [named expressions](../../expressions.md#named-nodes).
-Unlike scoped pragmas, regular pragmas can only be used in the global scope (not inside lambda functions, ACTION{% if feature_subquery %}, SUBQUERY{% endif %}, etc.).
-
+Unlike scoped pragmas, regular pragmas can only be used in the global scope (not inside lambda functions, ACTION{% if feature_subquery %}, SUBQUERY{% endif %}, etc.). \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/files.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/files.md
index 3b4d8122ea..ed9d9e2004 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/files.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/files.md
@@ -18,7 +18,7 @@ YQL reserves the right to cache files at the URL for an indefinite period, hence
| --- | --- | --- |
| Two string arguments: prefix and URL | — | Static |
-Attach a set of files to the query by URL. Works similarly to adding multiple files via `PRAGMA File`](#file) by direct links to files with aliases obtained by combining a prefix with a file name using `/`.
+Attach a set of files to the query by URL. Works similarly to adding multiple files via [`PRAGMA File`](#file) by direct links to files with aliases obtained by combining a prefix with a file name using `/`.
### Library
@@ -27,13 +27,12 @@ Attach a set of files to the query by URL. Works similarly to adding multiple fi
| One or two arguments: the file name and an optional URL | — | Static |
Treat the specified attached file as a library from which you can do [IMPORT](../../export_import.md). The syntax type for the library is determined from the file extension:
-
* `.sql`: For the YQL dialect of SQL <span style="color: green;">(recommended)</span>.
* `.yql`: For [s-expressions](/docs/s_expressions).
Example with a file attached to the query:
-```yql
+``` yql
PRAGMA library("a.sql");
IMPORT a SYMBOLS $x;
SELECT $x;
@@ -41,11 +40,10 @@ SELECT $x;
If the URL is specified, the library is downloaded from the URL rather than from the pre-attached file as in the following example:
-```yql
+``` yql
PRAGMA library("a.sql","https://paste.company-team.ru/5618566/text");
IMPORT a SYMBOLS $x;
SELECT $x;
```
{% endif %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/global.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/global.md
index 47e90ff8b1..f1d38beb4c 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/global.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/global.md
@@ -28,7 +28,6 @@ The prefix is not added if the table name is an absolute path (starts with /).
| 1. Action<br>2. Warning code or "*" | — |
Action:
-
* `disable`: Disable.
* `error`: Treat as an error.
* `default`: Revert to the default behavior.
@@ -40,12 +39,11 @@ Example:
`PRAGMA Warning("disable", "1101");`
`PRAGMA Warning("default", "4503");`
-In this case, all the warnings are treated as errors, except for the warning 1101 (that will be disabled) and 4503 (that will be processed by default, that is, remain a warning). Since warnings may be added in new YQL releases, use `PRAGMA Warning("error", "*");` with caution (at least cover such queries with autotests).
+In this case, all the warnings are treated as errors, except for the warning 1101(that will be disabled) and 4503(that will be processed by default, that is, remain a warning). Since warnings may be added in new YQL releases, use `PRAGMA Warning("error", "*");` with caution (at least cover such queries with autotests).
List of codes for warnings and errors: https://a.yandex-team.ru/arc/trunk/arcadia/yql/core/issue/protos/issue_id.proto
{% if feature_mapreduce %}
-
### DqEngine
| Value type | Default |
@@ -56,7 +54,6 @@ When set to "auto", it enables a new compute engine. Computing is made, whenever
{% endif %}
{% if feature_join %}
-
### SimpleColumns {#simplecolumns}
`SimpleColumns` / `DisableSimpleColumns`
@@ -80,7 +77,6 @@ It can be also used with [JOIN](../../join.md), but in this case it may fail in
Controls implicit Coalesce for the key `JOIN` columns in the SimpleColumns mode. If the flag is set, the Coalesce is made for key columns if there is at least one expression in the format `foo.*` or `*` in SELECT: for example, `SELECT a.* FROM T1 AS a JOIN T2 AS b USING(key)`. If the flag is not set, then Coalesce for JOIN keys is made only if there is an asterisk '*' after `SELECT`
### StrictJoinKeyTypes
-
`StrictJoinKeyTypes` / `DisableStrictJoinKeyTypes`
| Value type | Default |
@@ -102,7 +98,7 @@ StrictJoinKeyTypes is a [scoped](#pragmascope) setting.
This pragma brings the behavior of the `IN` operator in accordance with the standard when there's `NULL` in the left or right side of `IN`. The behavior of `IN` when on the right side there is a Tuple with elements of different types also changed. Examples:
`1 IN (2, 3, NULL) = NULL (was Just(False))`
-`NULL IN () = Just(False) (было NULL)`
+`NULL IN () = Just(False) (was NULL)`
`(1, null) IN ((2, 2), (3, 3)) = Just(False) (was NULL)`
`2147483648u IN (1, 2147483648u) = True (was False)`
@@ -115,8 +111,7 @@ For more information about the `IN` behavior when operands include `NULL`s, see
| Flag | false |
Aligns the RANK/DENSE_RANK behavior with the standard if there are optional types in the window sort keys or in the argument of such window functions. It means that:
-
-* The result type is always Uint64 rather than Uint64?;
+* The result type is always Uint64 rather than Uint64?.
* NULLs in keys are treated as equal to each other (the current implementation returns NULL).
You can explicitly select the old behavior by using the `DisableAnsiRankForNullableKeys` pragma. If no pragma is set, then a warning is issued and the old version works.
@@ -127,7 +122,6 @@ You can explicitly select the old behavior by using the `DisableAnsiRankForNulla
| Flag | false |
Aligns the UNION ALL behavior with the standard if there is `ORDER BY/LIMIT/DISCARD/INSERT INTO` in the combined subqueries. It means that:
-
* `ORDER BY/LIMIT/INSERT INTO` are allowed only after the last subquery.
* `DISCARD` is allowed only before the first subquery.
* The specified operators apply to the `UNION ALL` result (unlike the current behavior when they apply only to the subquery).
@@ -136,15 +130,14 @@ Aligns the UNION ALL behavior with the standard if there is `ORDER BY/LIMIT/DISC
You can explicitly select the old behavior by using the `DisableAnsiOrderByLimitInUnionAll` pragma. If no pragma is set, then a warning is issued and the old version works.
### OrderedColumns {#orderedcolumns}
-
`OrderedColumns`/`DisableOrderedColumns`
Output the [column order](../../select.md#orderedcolumns) in SELECT/JOIN/UNION ALL and preserve it when writing the results. The order of columns is undefined by default.
### PositionalUnionAll {#positionalunionall}
-Enable the standard column-by-column execution for [UNION ALL](../../select.md#unionall). This automatically enables
-[ordered columns](#orderedcolumns).
+Enable the standard column-by-column execution for [UNION ALL](../../select.md#unionall). This automatically enables
+ [ordered columns](#orderedcolumns).
### RegexUseRe2
@@ -170,7 +163,7 @@ ClassicDivision is a [scoped](#pragmascope) setting.
| --- | --- |
| Flag | false |
-Enable dot in names of result columns. |||UNTRANSLATED_CONTENT_START|||По умолчанию отключено, т.к. дальнейшее использование таких колонок в JOIN полностью не реализовано.|||UNTRANSLATED_CONTENT_END|||
+Enable dot in names of result columns. This behavior is disabled by default, since the further use of such columns in JOIN is not fully implemented.
### WarnUnnamedColumns
@@ -200,5 +193,4 @@ Increasing the limit on the number of dimensions in [GROUP BY](../../group_by.md
Use this option with care, because the computational complexity of the query grows exponentially with the number of dimensions.
-{% endif %}
-
+{% endif %} \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/ydb.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/ydb.md
index 1cca5678d8..94569ebdf9 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/ydb.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/ydb.md
@@ -10,5 +10,4 @@
An experimental pragma that allows you to reduce the isolation level of the current YDB transaction.
-{% endif %}
-
+{% endif %} \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/yson.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/yson.md
index 50058c132f..1a6ae1786a 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/yson.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/pragma/yson.md
@@ -25,4 +25,3 @@ Strict mode control in all Yson UDF calls, including implicit calls. If the valu
| Flag | false |
An inverted version of `yson.Strict`. If the value is omitted or is `"true"`, it disables the strict mode. If the value is `"false"`, it enables the strict mode.
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/process.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/process.md
index 2566380da3..ca562566fe 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/process.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/process.md
@@ -24,7 +24,7 @@ In the list of function arguments after the `USING` keyword, you can pass one of
* `TableRow()`: The entire current row in the form of a structure.
* `TableRows()`: A lazy iterator by strings, in terms of the types `Stream<Struct...>>`. In this case, the output type of the function can only be `Stream<OutputType>` or `List<OutputType>`.
-{% note info "Примечание" %}
+{% note info %}
After executing `{{ process_command }}`, within the same query, on the resulting table (or tables), you can perform {% if select_command != "SELECT STREAM" %}[SELECT](../select.md), [REDUCE](../reduce.md){% else %}[SELECT STREAM](../select_stream.md){% endif %}, [INSERT INTO](../insert_into.md), other `{{ process_command }}` and so on, depending on the intended result.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/assume_order_by.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/assume_order_by.md
index 4a4cf40498..df86cbf2ae 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/assume_order_by.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/assume_order_by.md
@@ -6,9 +6,8 @@ As in case of `ORDER BY`, it supports setting the sort order using the keywords
**Examples:**
-```yql
+``` yql
SELECT key || "suffix" as key, -CAST(subkey as Int32) as subkey
FROM my_table
ASSUME ORDER BY key, subkey DESC;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/calc.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/calc.md
index 09bc26c7f5..073718ef2b 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/calc.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/calc.md
@@ -6,11 +6,10 @@ It can be used in combination with other operations to obtain other effect.
**Examples:**
-```yql
+``` yql
SELECT "Hello, world!";
```
```yql
SELECT 2 + 2;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/column_order.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/column_order.md
index 900d508451..c6c4a6ecff 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/column_order.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/column_order.md
@@ -4,21 +4,19 @@ The standard SQL is sensitive to the order of columns in projections (that is, i
This applies, for example, to [UNION ALL](#unionall) and positional [ORDER BY](#orderby) (ORDER BY ordinal).
The column order is ignored in YQL by default:
-
* The order of columns in the output tables and query results is undefined
* The data scheme of the `UNION ALL` result is output by column names rather than positions
If you enable `PRAGMA OrderedColumns;`, the order of columns is preserved in the query results and is derived from the order of columns in the input tables using the following rules:
-
* `SELECT`: an explicit column enumeration dictates the result order.
-* `SELECT` with an asterisk (`SELECT * FROM ...`) inherits the order from its input. {% if feature_join %}* The order of columns after [JOIN](../../join.md): First output the left-hand columns, then the right-hand ones. If the column order in any of the sides in the `JOIN` output is undefined, the column order in the result is also undefined.{% endif %}
+* `SELECT` with an asterisk (`SELECT * FROM ...`) inherits the order from its input;
+{% if feature_join %}* The order of columns after [JOIN](../../join.md): First output the left-hand columns, then the right-hand ones. If the column order in any of the sides in the `JOIN` output is undefined, the column order in the result is also undefined.{% endif %}
* The order in `UNION ALL` depends on the [UNION ALL](#unionall) execution mode.
* The column order for [AS_TABLE](#as_table) is undefined.
-{% note warning "Внимание" %}
+{% note warning %}
In the YT table schema, key columns always precede non-key columns. The order of key columns is determined by the order of the composite key.
When `PRAGMA OrderedColumns;` is enabled, non-key columns preserve their output order.
{% endnote %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/commit.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/commit.md
index 0f42606613..fae8b2d43a 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/commit.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/commit.md
@@ -7,11 +7,10 @@ To commit in the same way automatically after each expression in the query, you
**Examples:**
-```yql
+``` yql
INSERT INTO result1 SELECT * FROM my_table;
INSERT INTO result2 SELECT * FROM my_table;
COMMIT;
-- result2 will already include the SELECT contents from the second line:
INSERT INTO result3 SELECT * FROM result2;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/distinct.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/distinct.md
index 4c1a31cc9b..79cb83ff04 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/distinct.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/distinct.md
@@ -10,10 +10,9 @@ Applying `DISTINCT` to calculated values is not currently implemented. For this
**Example**
-```yql
+``` yql
SELECT DISTINCT value -- only unique values from the table
FROM my_table;
```
-The `DISTINCT` keyword can also be used to apply [aggregate functions](../../../builtins/aggregation.md) only to distinct values. For more information, see the documentation for [GROUP BY](../../group_by.md).
-
+The `DISTINCT` keyword can also be used to apply [aggregate functions](../../../builtins/aggregation.md) only to distinct values. For more information, see the documentation for [GROUP BY](../../group_by.md). \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/execution.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/execution.md
index 242c170bd7..a3b1bdc45b 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/execution.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/execution.md
@@ -3,18 +3,17 @@
The `SELECT` query result is calculated as follows:
* Determine the set of input tables by evaluating the [FROM](#from) clauses.
-* Apply [SAMPLE](#sample)/[TABLESAMPLE](#sample) 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;
+* Apply [SAMPLE](#sample) / [TABLESAMPLE](#sample) to input tables.
+* Execute [FLATTEN COLUMNS](../../flatten.md#flatten-columns) or [FLATTEN BY](../../flatten.md); the aliases set in `FLATTEN BY` become visible after this point.
{% if feature_join %}* Execute every [JOIN](../../join.md).{% endif %}
-* 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).
* Execute [WHERE](#where) &mdash; Discard all the data mismatching the predicate.
* Execute [GROUP BY](../../group_by.md), evaluate aggregate functions.
-* Apply the filter [HAVING](../../group_by.md#having);
-{% if feature_window_functions %} * Evaluate [window functions](../../window.md){% endif %}
-* Evaluate expressions in `SELECT`
+* Apply the filter [HAVING](../../group_by.md#having).
+{% if feature_window_functions %} * Evaluate [window functions](../../window.md).{% endif %}
+* Evaluate expressions in `SELECT`.
* Assign names set by aliases to expressions in `SELECT`.
* Apply top-level [DISTINCT](#distinct) to the resulting columns.
-* Execute similarly every subquery inside [UNION ALL](#unionall), combine them (see [PRAGMA AnsiOrderByLimitInUnionAll](../../pragma.md#pragmas));
+* Execute similarly every subquery inside [UNION ALL](#unionall), combine them (see [PRAGMA AnsiOrderByLimitInUnionAll](../../pragma.md#pragmas)).
* Perform sorting with [ORDER BY](#order-by).
-* Apply [OFFSET and LIMIT](#limit-offset) to the result.
-
+* Apply [OFFSET and LIMIT](#limit-offset) to the result. \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/folder.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/folder.md
index 500da726fb..9547f62a59 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/folder.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/folder.md
@@ -10,7 +10,7 @@ Arguments:
The result is a table with three fixed columns:
1. **Path** (`String`): The full name of the table.
-2. **Type** (`String`): The node type (table, map_node, file, document, and others).;
+2. **Type** (`String`): The node type (table, map_node, file, document, and others).
3. **Attributes** (`Yson`) is a Yson dictionary with meta attributes ordered in the second argument.
Recommendations for use:
@@ -19,7 +19,7 @@ Recommendations for use:
* Since the Path column is output in the same format as the result of the function [TablePath()](../../../builtins/basic.md#tablepath), then they can be used to JOIN table attributes to its rows.
* We recommend that you work with the Attributes column using [Yson UDF](../../../udf/list/yson.md).
-{% note warning "Внимание" %}
+{% note warning %}
Use FOLDER with attributes containing large values with caution (`schema` could be one of those). A query with FOLDER applied to a folder with a large number of tables and a heavy attribute can create a heavy load on the YT wizard.
@@ -27,7 +27,7 @@ Use FOLDER with attributes containing large values with caution (`schema` could
**Examples:**
-```yql
+``` yql
USE hahn;
$table_paths = (
@@ -40,5 +40,4 @@ $table_paths = (
);
SELECT COUNT(*) FROM EACH($table_paths);
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from.md
index 65b9356c6e..ff42de5d73 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from.md
@@ -6,17 +6,16 @@ Data source for `SELECT`. The argument can accept the table name, the result of
**Examples**
-```yql
+``` yql
SELECT key FROM my_table;
```
-```yql
+``` yql
SELECT * FROM
(SELECT value FROM my_table);
```
-```yql
+``` yql
$table_name = "my_table";
SELECT * FROM $table_name;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_as_table.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_as_table.md
index c5fe4b8f2b..9db0c5b1d1 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_as_table.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_as_table.md
@@ -2,11 +2,11 @@
Accessing named expressions as tables using the `AS_TABLE` function.
-`AS_TABLE($variable)` lets you use the value of `$variable` as the data source for the query. In this case, the variable `$variable` must have the type `List>>`.
+`AS_TABLE($variable)` lets you use the value of `$variable` as the data source for the query. In this case, the variable `$variable` must have the type `List<Struct<...>>`.
**Example**
-```yql
+``` yql
$data = AsList(
AsStruct(1u AS Key, "v1" AS Value),
AsStruct(2u AS Key, "v2" AS Value),
@@ -14,4 +14,3 @@ $data = AsList(
SELECT Key, Value FROM AS_TABLE($data);
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_select.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_select.md
index 386e5ca429..068df845a1 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_select.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/from_select.md
@@ -4,14 +4,13 @@ An inverted format, first specifying the data source and then the operation.
**Examples**
-```yql
+``` yql
FROM my_table SELECT key, value;
```
-```yql
+``` yql
FROM a_table AS a
JOIN b_table AS b
USING (key)
SELECT *;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/functional_tables.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/functional_tables.md
index 3f5c6f8e5f..3114337889 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/functional_tables.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/functional_tables.md
@@ -18,7 +18,7 @@ The following functions are defined for these purposes:
```FILTER(`prefix`, `callable`, `suffix`, `view`)```: The `callable` argument must be a callable expression with the `(String)->Bool` signature that will be called for each table/subdirectory in the prefix folder. The query will only include those tables for which the callable value returned `true`. It is most convenient to use, as callable values, [lambda functions](../../expressions.md#lambda){% if yql == true %} or user-defined functions (UDF) written in [Python](../../../udf/python.md) or [JavaScript](../../../udf/javascript.md){% endif %}.
-{% note warning "Внимание" %}
+{% note warning %}
All of the above functions don't guarantee the order of the table union.
@@ -36,7 +36,7 @@ To get the name of the source table from which you originally obtained each row,
**Examples:**
-```yql
+``` yql
USE some_cluster;
SELECT * FROM CONCAT(
`table1`,
@@ -44,7 +44,7 @@ SELECT * FROM CONCAT(
`table3`);
```
-```yql
+``` yql
USE some_cluster;
$indices = ListFromRange(1, 4);
$tables = ListMap($indices, ($index) -> {
@@ -53,19 +53,19 @@ $tables = ListMap($indices, ($index) -> {
SELECT * FROM EACH($tables); -- Identical to the previous example
```
-```yql
+``` yql
USE some_cluster;
SELECT * FROM RANGE(`my_folder`);
```
-```yql
+``` yql
SELECT * FROM some_cluster.RANGE( -- You can specify the cluster before the function name
`my_folder`,
`from_table`,
`to_table`);
```
-```yql
+``` yql
USE some_cluster;
SELECT * FROM RANGE(
`my_folder`,
@@ -74,7 +74,7 @@ SELECT * FROM RANGE(
`my_table`);
```
-```yql
+``` yql
USE some_cluster;
SELECT * FROM RANGE(
`my_folder`,
@@ -84,7 +84,7 @@ SELECT * FROM RANGE(
`my_view`);
```
-```yql
+``` yql
USE some_cluster;
SELECT * FROM LIKE(
`my_folder`,
@@ -92,7 +92,7 @@ SELECT * FROM LIKE(
);
```
-```yql
+``` yql
USE some_cluster;
SELECT * FROM REGEXP(
`my_folder`,
@@ -100,7 +100,7 @@ SELECT * FROM REGEXP(
);
```
-```yql
+``` yql
$callable = ($table_name) -> {
return $table_name > "2017-03-13";
};
@@ -110,5 +110,4 @@ SELECT * FROM FILTER(
`my_folder`,
$callable
);
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/limit_offset.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/limit_offset.md
index 17de5253c0..a4433f0429 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/limit_offset.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/limit_offset.md
@@ -2,22 +2,21 @@
`LIMIT` limits the output to the specified number of rows. By default, the output is not restricted.
-`OFFSET`: specifies the offset from the beginning (in rows). By default, it's zero.
+`OFFSET` specifies the offset from the beginning (in rows). By default, it's zero.
**Examples**
-```yql
+``` yql
SELECT key FROM my_table
LIMIT 7;
```
-```yql
+``` yql
SELECT key FROM my_table
LIMIT 7 OFFSET 3;
```
-```yql
+``` yql
SELECT key FROM my_table
LIMIT 3, 7; -- equivalent to the previous example
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/order_by.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/order_by.md
index 2390f02238..22f7504d4c 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/order_by.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/order_by.md
@@ -3,7 +3,6 @@
Sorting the `SELECT` result using a comma-separated list of sorting criteria. As a criteria, you can use a column value or an expression on columns. Ordering by column sequence number is not supported (`ORDER BY N`where `N` is a number).
Each criteria can be followed by the sorting direction:
-
- `ASC`: Sorting in the ascending order. Applied by default.
- `DESC`: Sorting in the descending order.
@@ -11,13 +10,11 @@ Multiple sorting criteria will be applied left-to-right.
**Example**
-```yql
+``` yql
SELECT key, string_column
FROM my_table
ORDER BY key DESC, LENGTH(string_column) ASC;
```
-
{% if feature_window_functions %}
-You can also use `ORDER BY` for [window functions](../../window.md).
+You can use `ORDER BY` also for [window functions](../../window.md).
{% endif %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/sample.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/sample.md
index 463bd5f16b..2281f0148f 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/sample.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/sample.md
@@ -9,12 +9,12 @@ Building a random sample from the data source specified in `FROM`.
* `SYSTEM` uses knowledge about the physical data storage of data to avoid full data scans, but somewhat sacrificing randomness of the sample.
The data is split into sufficiently large blocks, and the whole data blocks are sampled. For applied calculations on sufficiently large tables, the result may well be consistent.
* The size of the random sample is indicated as a percentage after the operating mode, in parentheses.
-* To manage the block size in the `SYSTEM` mode, use the `yt.SamplingIoBlockSize` pragma
+* To manage the block size in the `SYSTEM` mode, use the `yt.SamplingIoBlockSize` pragma.
* Optionally, it can be followed by the `REPEATABLE` keyword and an integer in parentheses to be used as a seed for a pseudorandom number generator.
`SAMPLE` is a shorter alias without sophisticated settings and sample size specified as a fraction. It currently corresponds to the `BERNOULLI` mode.
-{% note info "Примечание" %}
+{% note info %}
In the `BERNOULLI` mode, if the `REPEATABLE` keyword is added, the seed is mixed with the chunk ID for each chunk in the table. That's why sampling from different tables with the same content might produce different results.
@@ -22,21 +22,20 @@ In the `BERNOULLI` mode, if the `REPEATABLE` keyword is added, the seed is mixe
**Examples:**
-```yql
+``` yql
SELECT *
FROM my_table
TABLESAMPLE BERNOULLI(1.0) REPEATABLE(123); -- one percent of the table
```
-```yql
+``` yql
SELECT *
FROM my_table
TABLESAMPLE SYSTEM(1.0); -- about one percent of the table
```
-```yql
+``` yql
SELECT *
FROM my_table
SAMPLE 1.0 / 3; -- one-third of the table
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/secondary_index.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/secondary_index.md
index 30da15826d..594752820c 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/secondary_index.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/secondary_index.md
@@ -2,7 +2,7 @@
To make a `SELECT` by secondary index statement, use the following:
-```yql
+``` yql
SELECT *
FROM TableName VIEW IndexName
WHERE …
@@ -12,7 +12,7 @@ SELECT *
* Select all the fields from the `series` table using the `views_index` index with the `views >=someValue` criteria:
- ```yql
+ ``` yql
SELECT series_id, title, info, release_date, views, uploaded_user_id
FROM series VIEW views_index
WHERE views >= someValue
@@ -20,11 +20,10 @@ SELECT *
* [`JOIN`](../../join.md) the `series` and `users` tables on the `userName` field using the `users_index` and `name_index` indexes, respectively:
- ```yql
+ ``` yql
SELECT t1.series_id, t1.title
FROM series VIEW users_index AS t1
INNER JOIN users VIEW name_index AS t2
ON t1.uploaded_user_id == t2.user_id
WHERE t2.name == userName;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/temporary_table.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/temporary_table.md
index 0117bfd058..4d32c0998f 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/temporary_table.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/temporary_table.md
@@ -8,7 +8,7 @@ This feature lets you ignore conflicts in paths to temporary tables between para
**Examples:**
-```yql
+``` yql
INSERT INTO @my_temp_table
SELECT * FROM my_input_table ORDER BY value;
@@ -21,7 +21,7 @@ SELECT * FROM @my_temp_table WHERE value = "456";
Temporary table names can use [named expressions](../../expressions.md#named-nodes):
-```yql
+``` yql
$tmp_name = "my_temp_table";
INSERT INTO @$tmp_name
@@ -30,5 +30,4 @@ SELECT 1 AS one, 2 AS two, 3 AS three;
COMMIT;
SELECT * FROM @$tmp_name;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all.md
index b76bf65163..4f384b8151 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all.md
@@ -12,7 +12,6 @@ The order of output columns in this mode is equal to the largest common prefix o
If the largest common prefix is empty (for example, if the order isn't specified for one of the inputs), then the output order is undefined.
In the "by position" mode, the output of the resulting data schema uses the following rules:
-
* All inputs must have equal number of columns
* The order of columns must be defined for all inputs
* The names of the resulting columns must match the names of columns in the first table
@@ -22,7 +21,7 @@ The order of the output columns in this mode is the same as the order of columns
**Examples**
-```yql
+``` yql
SELECT 1 AS x
UNION ALL
SELECT 2 AS y
@@ -32,11 +31,10 @@ SELECT 3 AS z;
In the default mode, this query returns a selection with three columns x, y, and z. When `PRAGMA PositionalUnionAll;` is enabled, the selection includes only the x column.
-```yql
+``` yql
PRAGMA PositionalUnionAll;
SELECT 1 AS x, 2 as y
UNION ALL
SELECT * FROM AS_TABLE([<|x:3, y:4|>]); -- error: the order of columns in AS_TABLE is undefined
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all_rules.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all_rules.md
index cd2032d47e..acd5bdb0ce 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all_rules.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/union_all_rules.md
@@ -1,5 +1,4 @@
* The resulting table includes all columns that were found in at least one of the input tables.
-* If a column wasn't present in all the input tables, then it's automatically assigned the [optional data type](../../../types/optional.md) (that can accept `NULL`);
+* If a column wasn't present in all the input tables, then it's automatically assigned the [optional data type](../../../types/optional.md) (that can accept `NULL`).
* If a column in different input tables had different types, then the shared type (the broadest one) is output.
* If a column in different input tables had a heterogeneous type, for example, string and numeric, an error is raised.
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/view.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/view.md
index cd556b49ef..36364425aa 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/view.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/view.md
@@ -8,16 +8,15 @@ Both of the views are non-materialized. It means that they are substituted into
Accessing a `VIEW`:
-* Views linked to a table require a special syntax: ```[cluster.]`path/to/table` VIEW view_name```;
+* Views linked to a table require a special syntax: ```[cluster.]`path/to/table` VIEW view_name```.
* Views that aren't linked to tables, look like regular tables from the user perspective.
If the meta attributes of the table specify an automatic UDF call to convert raw data into a structured set of columns, you can access raw data using a special `raw` view like this: ```[cluster.]`path/to/table` VIEW raw```.
**Examples:**
-```yql
+``` yql
USE some_cluster;
SELECT *
FROM my_table VIEW my_view;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/where.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/where.md
index 3c5e5bf18b..53c899dd7c 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/where.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/where.md
@@ -4,8 +4,7 @@ Filtering rows in the `SELECT` result based on a condition.
**Example**
-```yql
+``` yql
SELECT key FROM my_table
WHERE value > 0;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/with.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/with.md
index 45f74ecc8e..1ca172d97b 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/with.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/with.md
@@ -13,31 +13,30 @@ The following values are supported:
* `COLUMNS` type: Hints that the specified types should be used for columns whose names match the table's column names in the metadata, as well as which columns are additionally present in the table.
* `IGNORETYPEV3`, `IGNORE_TYPE_V3`: Sets the flag to ignore type_v3 types in the table. The behavior is similar to the [yt.IgnoreTypeV3 pragma](../../pragma.md#ignoretypev3), but for a specific data source.
-When setting the `SCHEMA` and `COLUMNS` hints, the type must be a[structure](../../../types/containers.md).
+When setting the `SCHEMA` and `COLUMNS` hints, the type must be a [structure](../../../types/containers.md).
If you use the `SCHEMA` hint, then with the table functions [EACH](#each), [RANGE](#range), [LIKE](#like), [REGEXP](#regexp), [FILTER](#filter) you can use an empty list of tables that is treated as an empty table with columns defined in the `SCHEMA`.
**Examples:**
-```yql
+``` yql
SELECT key FROM my_table WITH INFER_SCHEMA;
```
-```yql
+``` yql
$s = (SELECT COUNT(*) FROM my_table WITH XLOCK);
INSERT INTO my_table WITH TRUNCATE
SELECT EvaluateExpr($s) AS a;
```
-```yql
+``` yql
SELECT key, value FROM my_table WITH SCHEMA Struct<key:String, value:Int32>;
```
-```yql
+``` yql
SELECT key, value FROM my_table WITH COLUMNS Struct<value:Int32?>;
```
-```yql
+``` yql
SELECT key, value FROM EACH($my_tables) WITH SCHEMA Struct<key:String, value:List<Int32>>;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/without.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/without.md
index f61e5e9625..791aac43b3 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/without.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/select/without.md
@@ -4,13 +4,12 @@ Excluding columns from the result of `SELECT *`.
**Examples**
-```yql
+``` yql
SELECT * WITHOUT foo, bar FROM my_table;
```
-```yql
+``` yql
PRAGMA simplecolumns;
SELECT * WITHOUT t.foo FROM my_table AS t
CROSS JOIN (SELECT 1 AS foo) AS v;
```
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/subquery.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/subquery.md
index 0483360cf7..d9f77985c4 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/subquery.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/subquery.md
@@ -17,7 +17,7 @@ One or more of the last subquery parameters can be marked with a question as opt
{% if feature_mapreduce %}
-{% note info "Примечание" %}
+{% note info %}
In large queries, you can use separate files for action definition and include them to the main query using [EXPORT](../export_import.md#export) + [IMPORT](../export_import.md#import) so that instead of one long text you can have several logical parts that are easier to navigate. An important nuance: the `USE my_cluster;` directive in the import query doesn't affect behavior of actions declared in other subquery files.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/use.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/use.md
index cbe187af95..b08c305b22 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/use.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/_includes/use.md
@@ -16,7 +16,7 @@ As far as `USE` is concerned, you can add it inside [actions](../action.md){% if
USE {{ example_cluster }};
```
-{% note info "Примечание" %}
+{% note info %}
`USE` **doesn't** guarantee that the query will be executed against the specified cluster. The query might be executed against other cluster if it doesn't use any input data (for example, `USE foo; SELECT 2 + 2;` ) or if the full path to the table on other cluster has been specified (for example, `USE foo; SELECT * FROM bar.``path/to/table``;`).
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/expressions.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/expressions.md
index e3bce9d7dd..a381efbc22 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/expressions.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/expressions.md
@@ -29,4 +29,3 @@
{% include [x](_includes/expressions/lambda.md) %}
{% include [x](_includes/expressions/items-access.md) %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/index.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/index.md
index 3594e5b469..af923dcb90 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/index.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/index.md
@@ -53,4 +53,3 @@
{% if feature_mapreduce %}
* [EXPORT and IMPORT](export_import.md)
{% endif %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/select.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/select.md
index ed23eefd90..fda95879dd 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/select.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/select.md
@@ -47,4 +47,3 @@
{% include [x](_includes/select/temporary_table.md) %}
{% include [x](_includes/select/from_as_table.md) %}
-
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/toc_i.yaml b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/toc_i.yaml
index e2000fdf92..3f26c627cc 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/toc_i.yaml
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/syntax/toc_i.yaml
@@ -1,31 +1,31 @@
items:
-- { name: Overview, href: index.md }
-- { name: Lexical structure, href: lexer.md }
-- { name: Expressions, href: expressions.md }
-- { name: ACTION, href: action.md }
-- { name: ALTER TABLE, href: alter_table.md, when: feature_map_tables }
-- { name: CREATE TABLE, href: create_table.md }
-- { name: DECLARE, href: declare.md }
-- { name: DELETE, href: delete.md, when: feature_map_tables }
-- { name: DISCARD, href: discard.md }
-- { name: DROP TABLE, href: drop_table.md }
-- { name: GROUP BY, href: group_by.md }
-- { name: EXPORT и IMPORT, href: export_import.md, when: feature_mapreduce }
-- { name: FLATTEN, href: flatten.md }
-- { name: INSERT, href: insert_into.md }
-- { name: INTO RESULT, href: into_result.md }
-- { name: JOIN, href: join.md, when: feature_join }
-- { name: PRAGMA, href: pragma.md }
-- { name: PROCESS STREAM, href: process.md, when: feature_mapreduce and process_command == "PROCESS STREAM" }
-- { name: PROCESS, href: process.md, when: feature_mapreduce and process_command == "PROCESS" }
-- { name: REDUCE, href: reduce.md, when: feature_mapreduce and reduce_command == "REDUCE" }
-- { name: REPLACE, href: replace_into.md, when: feature_replace }
-- { name: SELECT, href: select.md }
-- { name: SELECT STREAM, href: select_stream.md, when: feature_mapreduce and process_command == "PROCESS STREAM" }
-- { name: SUBQUERY, href: subquery.md, when: feature_subquery }
-- { name: UPDATE, href: update.md, when: feature_map_tables }
-- { name: UPSERT, href: upsert_into.md, when: feature_upsert }
-- { name: USE, href: use.md, when: feature_mapreduce }
-- { name: VALUES, href: values.md }
-- { name: WINDOW, href: window.md, when: feature_window_functions }
+- { name: Overview, href: index.md }
+- { name: Lexical structure, href: lexer.md }
+- { name: Expressions, href: expressions.md }
+- { name: USE, href: use.md, when: feature_mapreduce }
+- { name: SELECT, href: select.md }
+- { name: VALUES, href: values.md }
+- { name: SELECT STREAM, href: select_stream.md, when: feature_mapreduce and process_command == "PROCESS STREAM" }
+- { name: CREATE TABLE, href: create_table.md }
+- { name: ALTER TABLE, href: alter_table.md, when: feature_map_tables }
+- { name: DROP TABLE, href: drop_table.md }
+- { name: INSERT, href: insert_into.md }
+- { name: UPDATE, href: update.md, when: feature_map_tables }
+- { name: DELETE, href: delete.md, when: feature_map_tables }
+- { name: REPLACE, href: replace_into.md, when: feature_replace }
+- { name: UPSERT, href: upsert_into.md, when: feature_upsert }
+- { name: GROUP BY, href: group_by.md }
+- { name: JOIN, href: join.md, when: feature_join }
+- { name: WINDOW, href: window.md, when: feature_window_functions }
+- { name: FLATTEN, href: flatten.md }
+- { name: ACTION, href: action.md }
+- { name: SUBQUERY, href: subquery.md, when: feature_subquery }
+- { name: DISCARD, href: discard.md }
+- { name: INTO RESULT, href: into_result.md }
+- { name: PROCESS STREAM, href: process.md, when: feature_mapreduce and process_command == "PROCESS STREAM" }
+- { name: PROCESS, href: process.md, when: feature_mapreduce and process_command == "PROCESS" }
+- { name: REDUCE, href: reduce.md, when: feature_mapreduce and reduce_command == "REDUCE" }
+- { name: PRAGMA, href: pragma.md }
+- { name: DECLARE, href: declare.md }
+- { name: EXPORT and IMPORT, href: export_import.md, when: feature_mapreduce }
- { name: Unsupported statements, href: not_yet_supported.md }
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/cast.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/cast.md
index b60808830c..cd112ee587 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/cast.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/cast.md
@@ -8,7 +8,7 @@
* The timezone, when casting from timezone types to date/time types without a timezone.
* If, in a certain combination of the source and target type, casting can't be performed for all possible values of the source type, then, if the casting fails, `CAST` returns `NULL`. In such cases, one `Optional` level is added to the return value type, unless already present. For example, the constructs: `CAST("3.14" AS Float?)` and `CAST("3.14" AS Float)` are fully equivalent and return `Float?`.
* If casting is possible for all values of the source type, then adding '?' works the same way as`Just` on top: `CAST(3.14 AS Utf8?)` is same as `Just(CAST(3.14 AS Utf8))`
-Все сочетания примитивных типов, для которых возможен `CAST` are described [here](../primitive.md).
+All combinations of primitive data types for which `CAST` can be used are described [here](../primitive.md).
## Casting rules for containers.
@@ -27,8 +27,8 @@ SELECT
### Rules for List/Dict
-* To create a list, `CAST` is applied to each item in the source list to cast it to the target type.
-* If the target item type is non-optional and `CAST` on the item might fail, then such casting is discarded. In this case, the resulting list might be shorter or even empty if every casting failed.
+* To create a list, `CAST` is applied to each element in the source list to cast it to the target type.
+* If the target element type is non-optional and `CAST` on the element might fail, then such casting is discarded. In this case, the resulting list might be shorter or even empty if every casting failed.
* For dictionaries, the casting is totally similar to lists, with `CAST` being applied to keys and values.
```yql
@@ -42,7 +42,7 @@ SELECT
### Rules for Struct/Tuple
-* A structure or tuple is created by applying `CAST` to each item of the source type to cast it to an item with the same name or target type index.
+* A structure or tuple is created by applying `CAST` to each element of the source type to cast it to an element with the same name or target type index.
* If some field is missing in the target type, it's simply discarded.
* If some field is missing in the source value type, then it can be added only if it's optional and accepts the `NULL` value.
* If some field is non-optional in the target type, but its casting might fail, then `CAST` adds Optional to the structure or tuple level and might return `NULL` for the entire result.
@@ -53,7 +53,7 @@ SELECT
CAST((-2, 0) AS Tuple<Uint16, Utf8>), -- null
CAST((3, 4) AS Tuple<Uint16, String>), -- (3, "4"): the type is Tuple<Uint16, String>?
CAST(("4",) AS Tuple<Uint16, String?>), -- (4, null)
- CAST((5, 6, null) AS Tuple<Uint8?>); -- (5,): the items were removed.
+ CAST((5, 6, null) AS Tuple<Uint8?>); -- (5,): the elements were removed.
SELECT -- One field was removed and one field was added: ("three":null, "two": "42")
CAST(<|one:"8912", two:42|> AS Struct<two:Utf8, three:Date?>);
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/containers.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/containers.md
index b9146a071d..69dc03e12a 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/containers.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/containers.md
@@ -4,7 +4,7 @@
| ------------ | ---------------- | ------------- |
| List | `List<Type>`,</br>`List<Int32>` | A variable-length sequence consisting of same-type elements. |
| Dictionary | `Dict<KeyType, ValueType>`,</br>`Dict<String,Int32>` | Set of key-value pairs with a fixed type of keys and values. |
-| Set | `Set<KeyType>`,</br>`Set<String>` | A set of elements with a fixed type is a special case of a dictionary with the `Void` value type. |
+| Set | `Set<KeyType>`,</br>`Set<String>` | A set of elements with a fixed type is a special case of a dictionary with the `Void` type of values. |
| Tuple | `Tuple<Type1, ..., TypeN>`,</br>`Tuple<Int32,Double>` | Set of unnamed fixed-length elements with types specified for all elements. |
| Structure | `Struct<Name1:Type1, ..., NameN:TypeN>`,</br> `Struct<Name:String,Age:Int32>` | A set of named fields with specified value types, fixed at query start (must be data-independent). |
| Stream | `Stream<Type>`,</br> `Stream<Int32>` | Single-pass iterator by same-type values, not serializable |
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_number.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_number.md
index f08382b4b7..e5395df48b 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_number.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_number.md
@@ -14,6 +14,6 @@
| `Decimal` | A real number with the specified precision, up to 35 decimal digits | {% if feature_map_tables %}When used in table columns, precision is fixed: Decimal (22,9).</br>Can't be used in the primary key{% endif %} |
{% if feature_map_tables %}
-`DyNumber` | A binary representation of a real number with an accuracy of up to 38 digits.<br/>Acceptable values: positive numbers from 1×10<sup>-130</sup> up to 1×10<sup>126</sup>–1, negative numbers from -1×10<sup>126</sup>–1 to -1×10<sup>-130</sup>, and 0.<br/>Compatible with the `Number` type in AWS DynamoDB. It's not recommended for {{ backend_name_lower }}-native applications. |
+`DyNumber` | A binary representation of a real number with an accuracy of up to 38 digits.<br/>Acceptable values: positive numbers from 1×10<sup>-130</sup> up to 1×10<sup>126</sup>–1, negative numbers from -1×10<sup>126</sup>–1 up to -1×10<sup>-130</sup>, and 0.<br/>Compatible with the `Number` type in AWS DynamoDB. It's not recommended for {{ backend_name_lower }}-native applications. |
{% endif %}
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_string.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_string.md
index 1fa66f2e27..95d59aafc6 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_string.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/datatypes_primitive_string.md
@@ -1,13 +1,13 @@
| Type | Description | Notes |
| ----- | ----- | ----- |
| `String` | A string that can contain any binary data |
-| `Utf8` | Text encoded in[UTF-8](https://en.wikipedia.org/wiki/UTF-8) |
+| `Utf8` | Text encoded in [UTF-8](https://en.wikipedia.org/wiki/UTF-8) |
| `Json` | [JSON](https://en.wikipedia.org/wiki/JSON) represented as text | Doesn't support matching{% if feature_map_tables %}, can't be used in the primary key{% endif %} |
| `JsonDocument` | [JSON](https://en.wikipedia.org/wiki/JSON) in an indexed binary representation | Doesn't support matching{% if feature_map_tables %}, can't be used in the primary key{% endif %} |
| `Yson` | [YSON](https://yt.yandex-team.ru/docs/description/common/yson.html) in a textual or binary representation. | Doesn't support matching{% if feature_map_tables %}, can't be used in the primary key{% endif %} |
| `Uuid` | Universally unique identifier [UUID](https://tools.ietf.org/html/rfc4122) | Not supported for table columns |
-{% note info "Ограничения на размер" %}
+{% note info "Cell size restrictions" %}
The maximum value size for a {% if feature_map_tables %}non-key {% endif %} column cell with any string data type is 8 MB.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/json.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/json.md
index 01c8517706..e0be51a469 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/json.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/json.md
@@ -28,7 +28,7 @@ Unsigned integer types.
Real 4-byte number.
-* Тип в JSON — `number`.
+* Type in JSON — `number`.
* Sample {{ backend_name }} value: `0.12345679`.
* Sample JSON value: `0.12345679`.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/optional.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/optional.md
index 72a4d5a013..4cf2d52056 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/optional.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/optional.md
@@ -36,15 +36,15 @@ The `NULL` literal has a separate singular `Null` type and can be implicitly con
```
SELECT
- True OR NULL, -- Just(True) (works the same way as True OR <unknown value of type Bool>)
+ True OR NULL, -- Just(True) (works the same way as True OR <unknown value of type Bool>)
False AND NULL, -- Just(False)
True AND NULL, -- NULL (to be more precise, Nothing<Bool?> – <unknown value of type Bool>)
- NULL OR NOT NULL, -- NULL (all NULLs are considered "different")
+ NULL OR NOT NULL, -- NULL (all NULLs are considered "different")
1 + NULL, -- NULL (Nothing<Int32?>) - the result of adding 1 together with
- -- an unknown Int value)
- 1 == NULL, -- NULL (the result of comparing 1 with an unknown Int value)
- (1, NULL) == (1, 2), -- NULL (composite elements are compared by component comparison
- -- using `AND')
+ -- an unknown Int value)
+ 1 == NULL, -- NULL (the result of comparing 1 with an unknown Int value)
+ (1, NULL) == (1, 2), -- NULL (composite elements are compared by component comparison
+ -- using `AND')
(2, NULL) == (1, 3), -- Just(False) (the expression is equivalent to 2 == 1 AND NULL == 3)
```
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/primitive.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/primitive.md
index 8f1a6a048c..2b9a8b401b 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/primitive.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/types/_includes/primitive.md
@@ -26,7 +26,7 @@ Explicit casting using [CAST](../../syntax/expressions.md#cast):
| Type | Bool | Int | Uint | Float | Double | Decimal |
| --- | --- | --- | --- | --- | --- | --- |
-| **Bool ** | — | Yes<sup>1</sup> | Yes<sup>1</sup> | Yes<sup>1</sup> | Yes<sup>1</sup> | No | Yes | No |
+| **Bool** | — | Yes<sup>1</sup> | Yes<sup>1</sup> | Yes<sup>1</sup> | Yes<sup>1</sup> | No | Yes | No |
| **INT** | Yes<sup>2</sup> | — | Yes<sup>3</sup> | Yes | Yes | Yes |
| **Uint** | Yes<sup>2</sup> | Yes | — | Yes | Yes | Yes |
| **Float** | Yes<sup>2</sup> | Yes | Yes | — | Yes | No |
@@ -42,16 +42,18 @@ Explicit casting using [CAST](../../syntax/expressions.md#cast):
| **Timestamp** | No | Yes | Yes | Yes | Yes | No |
| **Interval** | No | Yes | Yes | Yes | Yes | No |
-<sup>1</sup> `True` is converted to `1` and `False` to `0`.
+<sup>1</sup> `True` is converted to `1`, `False` is converted to `0`.
+
<sup>2</sup> Any value other than `0` is converted to `True`, `0` is converted to `False`.
-<sup>3</sup> Possible only in the case of a non-negative value.
+
+<sup>3</sup> his is possible only in the case of a non-negative value.
<sup>4</sup> Using the built-in function [Yson::ConvertTo](../../udf/list/yson.md#ysonconvertto).
### Converting to date and time data types
| Type | Date | Datetime | Timestamp | Interval |
| --- | --- | --- | --- | --- |
-| **Bool ** | No | No | No | No |
+| **Bool** | No | No | No | No |
| **INT** | Yes | Yes | Yes | Yes |
| **Uint** | Yes | Yes | Yes | Yes |
| **Float** | No | No | No | No |
@@ -71,7 +73,7 @@ Explicit casting using [CAST](../../syntax/expressions.md#cast):
| Type | String | Utf8 | Json | Yson | Uuid |
| --- | --- | --- | --- | --- | --- |
-| **Bool ** | Yes | No | No | No | No |
+| **Bool** | Yes | No | No | No | No |
| **INT** | Yes | No | No | No | No |
| **Uint** | Yes | No | No | No | No |
| **Float** | Yes | No | No | No | No |
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/histogram.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/histogram.md
index 9109c01811..7996a3b2ea 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/histogram.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/histogram.md
@@ -2,7 +2,7 @@
Set of auxiliary functions for the [HISTOGRAM aggregate function](../../../builtins/aggregation.md). In the signature description below, HistogramStruct refers to the result of the aggregate function `HISTOGRAM`, `LinearHistogram` or `LogarithmicHistogram` being a structure of a certain type.
-**List of functions **
+**List of functions**
* ```Histogram::Print(HistogramStruct{Flags:AutoMap}, Byte?) -> String```
* ```Histogram::Normalize(HistogramStruct{Flags:AutoMap}, [Double?]) -> HistogramStruct```: The second argument specifies the desired area of the histogram, 100 by default.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/string.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/string.md
index 2da77b4235..d574f82672 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/string.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/string.md
@@ -2,7 +2,7 @@
Functions for ASCII strings:
-**List of functions **
+**List of functions**
* ```String::Base64Encode(String{Flags:AutoMap}) -> String```
@@ -63,12 +63,12 @@ Functions for ASCII strings:
* ```String::AsciiToTitle(String{Flags:AutoMap}) -> String```: Changes only Latin characters. For working with other alphabets, see Unicode::ToTitle
* ```String::SplitToList( String?, String, [ DelimeterString:Bool?, SkipEmpty:Bool?, Limit:Uint64? ]) -> List<String>```
-Первый аргумент -- исходная строка
-Второй аргумент -- разделитель
-Третий аргумент -- параметры:
+ The first argument is the source string
+ The second argument is a delimiter
+ The third argument includes the following parameters:
- DelimeterString:Bool? — treating a delimiter as a string (true, by default) or a set of characters "any of" (false)
- - SkipEmpty:Bool? - whether to skip empty strings in the result, is false by default
- - Limit:Uint64? - Limits the number of fetched components (unlimited by default); if the limit is exceeded, the raw suffix of the source string is returned in the last item
+ - SkipEmpty:Bool? — whether to skip empty strings in the result, is false by default
+ - Limit:Uint64? — Limits the number of fetched components (unlimited by default); if the limit is exceeded, the raw suffix of the source string is returned in the last element
* ```String::JoinFromList(List<String>{Flags:AutoMap}, String) -> String```
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/unicode.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/unicode.md
index 366adec2b6..4553f311e9 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/unicode.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/unicode.md
@@ -2,20 +2,20 @@
Functions for Unicode strings.
-**List of functions **
+**List of functions**
* ```Unicode::IsUtf(String) -> Bool```
-Проверяет является ли строка валидной utf-8 последовательностью. Например, строка ```"\xF0"``` isn't a valid UTF-8 sequence, but the ```"\xF0\x9F\x90\xB1"``` string correctly describes a UTF-8 cat emoji.
+Checks whether a string is a valid UTF-8 sequence. For example, the string ```"\xF0"``` isn't a valid UTF-8 sequence, but the string ```"\xF0\x9F\x90\xB1"``` correctly describes a UTF-8 cat emoji.
* ```Unicode::GetLength(Utf8{Flags:AutoMap}) -> Uint64```
-Возвращает длину utf-8 строки в символах (unicode code points). Суррогатные пары учитываются как один символ.
+Returns the length of a utf-8 string in unicode code points. Surrogate pairs are counted as one character.
* ```Unicode::Find(Utf8{Flags:AutoMap}, Utf8, [Uint64?]) -> Uint64?```
* ```Unicode::RFind(Utf8{Flags:AutoMap}, Utf8, [Uint64?]) -> Uint64?```
* ```Unicode::Substring(Utf8{Flags:AutoMap}, from:Uint64?, len:Uint64?) -> Utf8```
-Возвращает подстроку начиная с символа ```from``` with the length of ```len``` characters. If the ```len``` argument is omitted, the substring is taken to the end of the source string.
+Returns a substring starting with ```from``` with the length of ```len``` characters. If the ```len``` argument is omitted, the substring is moved to the end of the source string.
* The ```Unicode::Normalize...``` functions convert the passed UTF-8 string to a [normalization form](https://unicode.org/reports/tr15/#Norm_Forms):
* ```Unicode::Normalize(Utf8{Flags:AutoMap}) -> Utf8``` -- NFC
@@ -25,31 +25,31 @@ Functions for Unicode strings.
* ```Unicode::NormalizeNFKC(Utf8{Flags:AutoMap}) -> Utf8```
* ```Unicode::Translit(Utf8{Flags:AutoMap}, [String?]) -> Utf8```
-Транслитерирует в латинский алфавит слова переданной строки, целиком состоящие из символов алфавита языка, переданного вторым аргументом. Если язык не указан, то транслитерация ведется с русского. Доступные языки: "kaz", "rus", "tur", "ukr".
+ Transliterates with Latin letters the words from the passed string, consisting entirely of characters of the alphabet of the language passed by the second argument. If no language is specified, the words are transliterated from Russian. Available languages: "kaz", "rus", "tur", and "ukr".
* ```Unicode::LevensteinDistance(Utf8{Flags:AutoMap}, Utf8{Flags:AutoMap}) -> Uint64```
-Вычисляет расстояние Левенштейна для переданных строк.
+ Calculates the Levenshtein distance for the passed strings.
* ```Unicode::Fold(Utf8{Flags:AutoMap}, [ Language:String?, DoLowerCase:Bool?, DoRenyxa:Bool?, DoSimpleCyr:Bool?, FillOffset:Bool? ]) -> Utf8```
-Выполняет [A case folding](https://www.w3.org/TR/charmod-norm/#definitionCaseFolding) on the passed string. ```Language``` is set according to the same rules as in ```Unicode::Translit()```. ```DoLowerCase``` converts a string to lowercase letters, defaults to ```true```.
+ [A case folding](https://www.w3.org/TR/charmod-norm/#definitionCaseFolding) is performed on the passed string. ```Language``` is set according to the same rules as in ```Unicode::Translit()```. ```DoLowerCase``` converts a string to lowercase letters, defaults to ```true```.
* ```Unicode::ReplaceAll(Utf8{Flags:AutoMap}, Utf8, Utf8) -> Utf8```
-Aргументы: ```input```, ```find```, ```replacement```. Replaces all occurrences of the ```find``` string in the ```input``` with ```replacement```.
+ Arguments: ```input```, ```find```, ```replacement```. Replaces all occurrences of the ```find``` string in the ```input``` with ```replacement```.
* ```Unicode::ReplaceFirst(Utf8{Flags:AutoMap}, Utf8, Utf8) -> Utf8```
-Aргументы: ```input```, ```findSymbol```, ```replacementSymbol```. Replaces the first occurrence of the ```findSymbol``` character in the ```input``` with ```replacementSymbol```. The character can't be a surrogate pair.
+ Arguments: ```input```, ```findSymbol```, ```replacementSymbol```. Replaces the first occurrence of the ```findSymbol``` character in the ```input``` with ```replacementSymbol```. The character can't be a surrogate pair.
* ```Unicode::ReplaceLast(Utf8{Flags:AutoMap}, Utf8, Utf8) -> Utf8```
-Aргументы: ```input```, ```findSymbol```, ```replacementSymbol```. Replaces the last occurrence of the ```findSymbol``` character in the ```input``` with ```replacementSymbol```. The character can't be a surrogate pair.
+ Arguments: ```input```, ```findSymbol```, ```replacementSymbol```. Replaces the last occurrence of the ```findSymbol``` character in the ```input``` with ```replacementSymbol```. The character can't be a surrogate pair.
* ```Unicode::RemoveAll(Utf8{Flags:AutoMap}, Utf8) -> Utf8```
-Второй аргумент интерпретируется как неупорядоченный набор символов для удаления. Удаляются все вхождения.
+ The second argument is interpreted as an unordered set of characters to be removed. Removes all occurrences.
* ```Unicode::RemoveFirst(Utf8{Flags:AutoMap}, Utf8) -> Utf8```
-Второй аргумент интерпретируется как неупорядоченный набор символов для удаления. Удаляется первое вхождение.
+ The second argument is interpreted as an unordered set of characters to be removed. Removes the first occurrence.
* ```Unicode::RemoveLast(Utf8{Flags:AutoMap}, Utf8) -> Utf8```
-Второй аргумент интерпретируется как неупорядоченный набор символов для удаления. Удаляется последнее вхождение.
+ The second argument is interpreted as an unordered set of characters to be removed. Removes the last occurrence.
* ```Unicode::ToCodePointList(Utf8{Flags:AutoMap}) -> List<Uint32>```
@@ -64,12 +64,12 @@ Aргументы: ```input```, ```findSymbol```, ```replacementSymbol```. Repla
* ```Unicode::ToTitle(Utf8{Flags:AutoMap}) -> Utf8```
* ```Unicode::SplitToList( Utf8?, Utf8, [ DelimeterString:Bool?, SkipEmpty:Bool?, Limit:Uint64? ]) -> List<Utf8>```
-Первый аргумент -- исходная строка
-Второй аргумент -- разделитель
-Третий аргумент -- параметры:
+ The first argument is the source string
+ The second argument is a delimiter
+ The third argument includes the following parameters:
- DelimeterString:Bool? — treating a delimiter as a string (true, by default) or a set of characters "any of" (false)
- SkipEmpty:Bool? - whether to skip empty strings in the result, is false by default
- - Limit:Uint64? - Limits the number of fetched components (unlimited by default); if the limit is exceeded, the raw suffix of the source string is returned in the last item
+ - Limit:Uint64? - Limits the number of fetched components (unlimited by default); if the limit is exceeded, the raw suffix of the source string is returned in the last element
* ```Unicode::JoinFromList(List<Utf8>{Flags:AutoMap}, Utf8) -> Utf8```
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/url.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/url.md
index ebd1820524..c9e9ed9b34 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/url.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/_includes/url.md
@@ -4,8 +4,8 @@
* ```Url::Normalize(String) -> String?```
-Normalizes the URL in a robot-friendly way: converts the hostname into lowercase, strips out certain fragments, and so on.
-The normalization result only depends on the URL itself. The normalization **DOES NOT** include operations depending on the external data: transformation based on duplicates, mirrors, etc.
+Normalizes the URL in a robot-friendly way: converts the hostname into lowercase, strips out certain fragments, etc.
+The normalization result depends only on the URL itself. The normalization **DOES NOT** include operations depending on the external data: transformation based on duplicates, mirrors, etc.
Returned value:
@@ -41,7 +41,7 @@ SELECT Url::NormalizeWithDefaultHttpScheme("http://ya.ru#foo"); -- "http://ya.ru
Encode a UTF-8 string to the urlencoded format (`Url::Encode`) and back (`Url::Decode`).
-**List of functions **
+**List of functions**
* ```Url::Encode(String?) -> String?```
* ```Url::Decode(String?) -> String?```
@@ -85,7 +85,7 @@ SELECT Url::Parse(
Get a component of the URL.
-**List of functions **
+**List of functions**
* ```Url::GetScheme(String{Flags:AutoMap}) -> String```
@@ -118,10 +118,10 @@ Get a component of the URL.
* ```Url::GetDomainLevel(String{Flags:AutoMap}) -> Uint64```
* ```Url::GetSignificantDomain(String{Flags:AutoMap}, [List<String>?]) -> String```
-Возвращает домен второго уровня в большинстве случаев и домен третьего уровня для хостеймов вида: ***.XXX.YY, где XXX — одно из com, net, org, co, gov, edu. Этот список можно переопределить через опциональный второй аргумент
+ Returns a second-level domain in most cases and a third-level domain for the hostnames like: ***.XXX.YY, where XXX is com, net, org, co, gov, or edu. You can redefine this list using an optional second argument
* ```Url::GetOwner(String{Flags:AutoMap}) -> String```
-Возвращает домен, которым с наибольшей вероятностью владеет отдельный человек или организация. В отличие от Url::GetSignificantDomain работает по специальному whitelist, и помимо доменов из серии ***.co.uk возвращает домен третьего уровня для, например, бесплатных хостингов и блогов, скажем something.livejournal.com
+ Returns the domain that's most likely owned by an individual or organization. Unlike Url::GetSignificantDomain, it uses a special whitelist. Besides the ***.co.uk domains, it can return a third-level domain used by free hosting sites and blogs (for example: something.livejournal.com)s
**Examples**
@@ -133,16 +133,16 @@ SELECT Url::GetDomain("http://www.yandex.ru", 2); -- "yandex.ru"
## Cut... {#cut}
* ```Url::CutScheme(String?) -> String?```
-Возвращает переданный URL уже без схемы (http://, https:// и т.п.).
+ Returns the passed URL without the schema (http://, https://, etc.).
* ```Url::CutWWW(String?) -> String?```
-Возвращает переданный домен без префикса "www.", если он имелся.
+ Returns the passed domain without the "www." prefix (if any).
* ```Url::CutWWW2(String?) -> String?```
-Возвращает переданный домен без префикса "www.", "www2.", "wwww777." и тому подобных, если он имелся.
+ Returns the passed domain without the prefixes like " www.", " www2.", " wwww777." (if any).
* ```Url::CutQueryStringA­ndFragment(String{Flags:AutoMap}) -> String```
-Возращает копию переданного URL с удаленными всеми CGI параметрами и фрагментами ("?foo=bar" и/или "#baz").
+ Returns a copy of the passed URL, stripping out all the CGI parameters and fragments ("?foo=bar" and/or "#baz").
**Examples**
@@ -155,7 +155,7 @@ SELECT Url::CutWWW("www.yandex.ru"); -- "yandex.ru"
[Punycode](https://en.wikipedia.org/wiki/Punycode) transformations.
-**List of functions **
+**List of functions**
* ```Url::HostNameToPunycode(String{Flag:AutoMap}) -> String?```
* ```Url::ForceHostNameToPunycode(String{Flag:AutoMap}) -> String```
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/datetime.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/datetime.md
index 44d3942fa5..02c7c57cce 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/datetime.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/datetime.md
@@ -20,7 +20,7 @@ If the timezone is not GMT, the components store the local time for the relevant
Conversion from a primitive type to an internal representation. It's always successful on a non-empty input.
-**List of functions **
+**List of functions**
* ```DateTime::Split(Date{Flags:AutoMap}) -> Resource<TM>```
* ```DateTime::Split(Datetime{Flags:AutoMap}) -> Resource<TM>```
@@ -35,7 +35,7 @@ Functions that accept `Resource<TM>` as input, can be called directly from the p
Making a primitive type from an internal representation. It's always successful on a non-empty input.
-**List of functions **
+**List of functions**
* ```DateTime::MakeDate(Resource<TM>{Flags:AutoMap}) -> Date```
* ```DateTime::MakeDatetime(Resource<TM>{Flags:AutoMap}) -> Datetime```
@@ -62,7 +62,7 @@ SELECT
Extracting a component from an internal representation.
-**List of functions **
+**List of functions**
* ```DateTime::GetYear(Resource<TM>{Flags:AutoMap}) -> Uint16```
* ```DateTime::GetDayOfYear(Resource<TM>{Flags:AutoMap}) -> Uint16```
@@ -97,7 +97,7 @@ SELECT
Updating one or more components in the internal representation. Returns either an updated copy or NULL, if an update produces an invalid date or other inconsistencies.
-**List of functions **
+**List of functions**
* ```DateTime::Update( Resource<TM>{Flags:AutoMap}, [ Year:Uint16?, Month:Uint8?, Day:Uint8?, Hour:Uint8?, Minute:Uint8?, Second:Uint8?, Microsecond:Uint32?, Timezone:String? ]) -> Resource<TM>?```
@@ -121,7 +121,7 @@ SELECT
Getting a Timestamp from the number of seconds/milliseconds/microseconds since the UTC epoch. When the Timestamp limits are exceeded, NULL is returned.
-**List of functions **
+**List of functions**
* ```DateTime::FromSeconds(Uint32{Flags:AutoMap}) -> Timestamp```
* ```DateTime::FromMilliseconds(Uint64{Flags:AutoMap}) -> Timestamp```
@@ -131,7 +131,7 @@ Getting a Timestamp from the number of seconds/milliseconds/microseconds since t
Getting a number of seconds/milliseconds/microseconds since the UTC Epoch from a primitive type.
-**List of functions **
+**List of functions**
* ```DateTime::ToSeconds(Date/DateTime/Timestamp/TzDate/TzDatetime/TzTimestamp{Flags:AutoMap}) -> Uint32```
* ```DateTime::ToMilliseconds(Date/DateTime/Timestamp/TzDate/TzDatetime/TzTimestamp{Flags:AutoMap}) -> Uint64```
@@ -149,7 +149,7 @@ SELECT
Conversions between ```Interval``` and various time units.
-**List of functions **
+**List of functions**
* ```DateTime::ToDays(Interval{Flags:AutoMap}) -> Int16```
* ```DateTime::ToHours(Interval{Flags:AutoMap}) -> Int32```
@@ -181,7 +181,7 @@ SELECT
Get the start of the period including the date/time. If the result is invalid, NULL is returned. If the timezone is different from GMT, then the period start is in the specified time zone.
-**List of functions **
+**List of functions**
* ```DateTime::StartOfYear(Resource<TM>{Flags:AutoMap}) -> Resource<TM>?```
* ```DateTime::StartOfQuarter(Resource<TM>{Flags:AutoMap}) -> Resource<TM>?```
@@ -226,10 +226,11 @@ SELECT
## Shift... {#shift}
-Add/subtract the specified number of units to/from the component in the internal representation and update the other fields.
+Add/subtract the specified number of units to the component in the internal representation and update the other fields.
+
Returns either an updated copy or NULL, if an update produces an invalid date or other inconsistencies.
-**List of functions **
+**List of functions**
* ```DateTime::ShiftYears(Resource<TM>{Flags:AutoMap}, Int32) -> Resource<TM>?```
* ```DateTime::ShiftQuarters(Resource<TM>{Flags:AutoMap}, Int32) -> Resource<TM>?```
@@ -256,7 +257,7 @@ SELECT
Get a string representation of a time using an arbitrary formatting string.
-**List of functions **
+**List of functions**
* ```DateTime::Format(String) -> (Resource<TM>{Flags:AutoMap}) -> String```
@@ -290,7 +291,7 @@ SELECT
Parse a string into an internal representation using an arbitrary formatting string. Default values are used for empty fields. If errors are raised, NULL is returned.
-**List of functions **
+**List of functions**
* ```DateTime::Parse(String) -> (String{Flags:AutoMap}) -> Resource<TM>?```
@@ -324,7 +325,7 @@ SELECT
For the common formats, wrappers around the corresponding util methods are supported. You can only get TM with components in the UTC timezone.
-**List of functions **
+**List of functions**
* ```DateTime::ParseRfc822(String{Flags:AutoMap}) -> Resource<TM>?```
* ```DateTime::ParseIso8601(String{Flags:AutoMap}) -> Resource<TM>?```
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/digest.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/digest.md
index ac98c7f6f4..f861fe8c7c 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/digest.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/digest.md
@@ -2,7 +2,7 @@
A set of commonly used hash functions.
-**List of functions **
+**List of functions**
* ```Digest::Crc32c(String{Flags::AutoMap}) -> Uint32```
* ```Digest::Fnv32(String{Flags::AutoMap}) -> Uint32```
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/hyperscan.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/hyperscan.md
index 483598d10c..0309e79059 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/hyperscan.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/hyperscan.md
@@ -6,7 +6,7 @@ The library includes 4 implementations that use different sets of processor inst
By default, all functions work in the single-byte mode. However, if the regular expression is a valid UTF-8 string but is not a valid ASCII string, the UTF-8 mode is enabled automatically.
-**List of functions **
+**List of functions**
* ```Hyperscan::Grep(String) -> (String?) -> Bool```
* ```Hyperscan::Match(String) -> (String?) -> Bool```
@@ -28,6 +28,7 @@ SELECT * FROM table WHERE $re(key); -- use it to filter the table
**Please note** escaping of special characters in regular expressions. Be sure to use the second slash, since all the standard string literals in SQL can accept C-escaped strings, and the `\d` sequence is not valid sequence (even if it were, it wouldn't search for numbers as intended).
+
You can enable the case-insensitive mode by specifying, at the beginning of the regular expression, the flag `(?i)`.
## Grep {#grep}
@@ -45,6 +46,7 @@ For example, the following two queries are equivalent (also in terms of computin
Matches **the whole string** against the regular expression.
+
To get a result similar to `Grep` (where substring matching is included), enclose the regular expression in `.*` (`.*foo.*` instead of `foo`). However, in terms of code readability, it's usually better to change the function.
## BacktrackingGrep/BacktrackingMatch {#backtrackinggrep}
@@ -57,6 +59,7 @@ Those functions are currently called in the binary operators [REGEXP](../../synt
Hyperscan lets you match against multiple regular expressions in a single pass through the text, and get a separate response for each match.
+
However, if you want to match a string against any of the listed expressions (the results would be joined with "or"), it would be more efficient to combine the query parts in a single regular expression with `|` and match it with regular `Grep` or `Match`.
When you call `MultiGrep`/`MultiMatch`, regular expressions are passed one per line using [multiline string literals](../../syntax/expressions.md#named-nodes):
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/ip.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/ip.md
index fb4dad0f6d..ab11e7cd3a 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/ip.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/ip.md
@@ -2,7 +2,7 @@
The `Ip` module supports both the IPv4 and IPv6 addresses. By default, they are represented as binary strings of 4 and 16 bytes, respectively.
-**List of functions **
+**List of functions**
* ```Ip::FromString(String{Flags:AutoMap}) -> String?``` - From a human-readable representation to a binary representation.
* ```Ip::ToString(String{Flags:AutoMap}) -> String?``` - From a binary representation to a human-readable representation.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/math.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/math.md
index c7b0ee8589..2368ed2cdb 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/math.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/math.md
@@ -4,7 +4,7 @@ A set of wrappers around the functions from the libm library and the Yandex util
## Constants {#constants}
-**List of functions **
+**List of functions**
* ```Math::Pi() -> Double```
* ```Math::E() -> Double```
@@ -18,7 +18,7 @@ SELECT Math::E(); -- 2.718281828
## (Double) -> Bool {#double-bool}
-**List of functions **
+**List of functions**
* ```Math::IsInf(Double{Flags:AutoMap}) -> Bool```
* ```Math::IsNaN(Double{Flags:AutoMap}) -> Bool```
@@ -33,7 +33,7 @@ SELECT Math::IsFinite(1.0/0.0); -- false
## (Double) -> Double {#double-double}
-**List of functions **
+**List of functions**
* ```Math::Abs(Double{Flags:AutoMap}) -> Double```
* ```Math::Acos(Double{Flags:AutoMap}) -> Double```
@@ -72,7 +72,7 @@ SELECT Math::Trunc(1.2345); -- 1
## (Double, Double) -> Double {#doubledouble-double}
-**List of functions **
+**List of functions**
* ```Math::Atan2(Double{Flags:AutoMap}, Double{Flags:AutoMap}) -> Double```
* ```Math::Fmod(Double{Flags:AutoMap}, Double{Flags:AutoMap}) -> Double```
@@ -89,11 +89,12 @@ SELECT Math::Remainder(2.1, 2); -- 0.1
## (Double, Int32) -> Double {#doubleint32-double}
-**List of functions **
+**List of functions**
* ```Math::Ldexp(Double{Flags:AutoMap}, Int32{Flags:AutoMap}) -> Double```
* ```Math::Round(Double{Flags:AutoMap}, [Int32?]) -> Double```: The second argument indicates the power of 10 to which we round (it's negative for decimal digits and positive for rounding to tens, thousands, or millions); the default value is 0
+
**Examples**
```sql
@@ -103,7 +104,7 @@ SELECT Math::Round(1.2345, -2); -- 1.23
## (Double, Double, \[Double?\]) -> Bool {#doubledouble-bool}
-**List of functions **
+**List of functions**
* ```Math::FuzzyEquals(Double{Flags:AutoMap}, Double{Flags:AutoMap}, [Double?]) -> Bool```: Compares two Doubles for being inside the neighborhood specified by the third argument; the default value is 1.0e-13
@@ -115,7 +116,7 @@ SELECT Math::FuzzyEquals(1.01, 1.0, 0.05); -- true
## Functions for computing remainders
-**List of functions **
+**List of functions**
* ```Math::Mod(Int64{Flags:AutoMap}, Int64) -> Int64?```
* ```Math::Rem(Int64{Flags:AutoMap}, Int64) -> Int64?```
@@ -124,6 +125,8 @@ These functions behave similarly to the built-in % operator in the case of non-n
* Math::Mod preserves the sign of the second argument (the denominator).
* Math::Rem preserves the sign of the first argument (the numerator).
+
+
Functions return null if the divisor is zero.
**Examples**
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/pire.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/pire.md
index 58c4127fc6..be9ca7b48a 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/pire.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/pire.md
@@ -1,6 +1,6 @@
# Pire
-**List of functions **
+**List of functions**
* ```Pire::Grep(String) -> (String?) -> Bool```
* ```Pire::Match(String) -> (String?) -> Bool```
@@ -81,15 +81,18 @@ Matches the regular expression with a **part of the string** (arbitrary substrin
## Match {#match}
Matches **the whole string** against the regular expression.
+
To get a result similar to `Grep` (where substring matching is included), enclose the regular expression in `.*`. For example, use `.*foo.*` instead of `foo`.
## MultiGrep/MultiMatch {#multigrep}
Pire lets you match against multiple regular expressions in a single pass through the text and get a separate response for each match.
+
Use the MultiGrep/MultiMatch functions to optimize the query execution speed. Be sure to do it carefully, since the size of the state machine used for matching grows exponentially with the number of regular expressions:
* If you want to match a string against any of the listed expressions (the results are joined with "or"), it would be much more efficient to combine the query parts in a single regular expression with `|` and match it using regular Grep or Match.
* Pire has a limit on the size of the state machine (YQL uses the default value set in the library). If you exceed the limit, the error is raised at the start of the query: `Failed to glue up regexes, probably the finite state machine appeared to be too large`.
+
When you call MultiGrep/MultiMatch, regular expressions are passed one per line using [multiline string literals](../../syntax/expressions.md#multiline-string-literals):
**Examples**
@@ -112,6 +115,7 @@ SELECT
## Capture {#capture}
If a string matches the specified regular expression, it returns a substring that matches the group enclosed in parentheses in the regular expression.
+
Capture is non-greedy: the shortest possible substring is returned.
{% note alert %}
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/re2.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/re2.md
index 2adb03def3..3efec1f12f 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/re2.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/re2.md
@@ -1,6 +1,6 @@
# Re2
-**List of functions **
+**List of functions**
* ```Re2::Grep(String) -> (String?) -> Bool```
* ```Re2::Match(String) -> (String?) -> Bool```
@@ -55,7 +55,8 @@ If you leave out the details of implementation and syntax of regular expressions
## Re2::Capture {#capture}
-Unlike [Pire::Capture](pire.md#capture), `Re2::Capture` supports multiple and named capturing groups.
+Unlike [Pire::Capture](pire.md#capture) , `Re2:Capture` supports multiple and named capturing groups.
+
Result type: a structure with the fields of the type `String?`.
* Each field corresponds to a capturing group with the applicable name.
diff --git a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/yson.md b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/yson.md
index 07999833cb..9da69f12c9 100644
--- a/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/yson.md
+++ b/ydb/docs/en/core/yql/reference/yql-docs-core-2/udf/list/yson.md
@@ -18,7 +18,7 @@ Implementation specifics and functionality of the module:
* `Yson::Parse***`: Getting a resource with a DOM object from serialized data, with all further operations performed on the obtained resource.
* `Yson::From`: Getting a resource with a DOM object from simple YQL data types or containers (lists or dictionaries).
* `Yson::ConvertTo***`: Converting a resource to [primitive data types](../../types/primitive.md) or [containers](../../types/containers.md).
- * `Yson::Lookup***`: Getting a single list item or a dictionary with optional conversion to the relevant data type.
+ * `Yson::Lookup***`: Getting a single list element or a dictionary with optional conversion to the relevant data type.
* `Yson::YPath***`: Getting one element from the document tree based on the relative path specified, optionally converting it to the relevant data type.
* `Yson::Serialize***`: Getting a copy of data from the resource and serializing the data in one of the formats.
* For convenience, when serialized Yson and Json are passed to functions expecting a resource with a DOM object, implicit conversion using `Yson::Parse` or `Yson::ParseJson` is done automatically. In SQL syntax, the dot or square brackets operator automatically adds a `Yson::Lookup` call. To serialize a resource, you still need to call `Yson::ConvertTo***` ([here's the ticket about CAST syntax support](https://st.yandex-team.ru/YQL-2610)) or `Yson::Serialize***`. It means that, for example, to get the "foo" element as a string from the Yson column named mycolumn and serialized as a dictionary, you can write: `SELECT Yson::ConvertToString(mycolumn["foo"]) FROM mytable;` or `SELECT Yson::ConvertToString(mycolumn.foo) FROM mytable;`. In the variant with a dot, special characters can be escaped by [general rules for IDs](../../syntax/expressions.md#escape).
@@ -28,7 +28,7 @@ The module's functions must be considered as "building blocks" from which you ca
* `Yson::Parse*** -> Yson::Serialize***`: Converting from one format to other.
* `Yson::Parse*** -> Yson::Lookup -> Yson::Serialize***`: Extracting the value of the specified subtree in the source YSON tree.
-* `Yson::Parse*** -> Yson::ConvertToList -> ListMap -> Yson::Lookup***`: Extracting items by a key from the YSON list.
+* `Yson::Parse*** -> Yson::ConvertToList -> ListMap -> Yson::Lookup***`: Extracting elements by a key from the YSON list.
See also examples of combining YSON functions in the [tutorial](https://yql.yandex-team.ru/Tutorial/yt_17_Yson_and_Json).
@@ -77,7 +77,7 @@ Yson::ParseJsonDecodeUtf8(String{Flags:AutoMap}) -> Resource<'Yson2.Node'>?
The result of all three functions is non-serializable: it can only be passed as the input to other function from the Yson library. However, you can't save it to a table or return to the client as a result of the operation: such an attempt results in a typing error. You also can't return it outside [subqueries](../../syntax/select.md): if you need to do this, call [Yson::Serialize](#ysonserialize), and the optimizer will remove unnecessary serialization and deserialization if materialization isn't needed in the end.
-{% note info "Примечание" %}
+{% note info "Note" %}
The `Yson::ParseJsonDecodeUtf8` expects that characters outside the ASCII range must be additionally escaped. For detailed escaping rules, see the [YT code](https://a.yandex-team.ru/arc/trunk/arcadia/yt/yt/core/misc/utf8_decoder.cpp).
@@ -161,7 +161,7 @@ Yson::ConvertToDoubleDict(Resource<'Yson2.Node'>{Flags:AutoMap}) -> Dict<String,
Yson::ConvertToStringDict(Resource<'Yson2.Node'>{Flags:AutoMap}) -> Dict<String,String>
```
-{% note warning "Внимание" %}
+{% note warning "Attention" %}
These functions do not do implicit type casting by default, that is, the value in the argument must exactly match the function called.
@@ -176,6 +176,7 @@ Yson::Contains(Resource<'Yson2.Node'>{Flags:AutoMap}, String) -> Bool?
```
Checks for a key in the dictionary. If the object type is a map, then it searches among the keys.
+
If the object type is a list, then the key must be a decimal number, i.e., an index in the list.
## Yson::Lookup... {#ysonlookup}
diff --git a/ydb/docs/en/core/yql/tutorial/_includes/index/intro.md b/ydb/docs/en/core/yql/tutorial/_includes/index/intro.md
index 09f474dc32..09014a6711 100644
--- a/ydb/docs/en/core/yql/tutorial/_includes/index/intro.md
+++ b/ydb/docs/en/core/yql/tutorial/_includes/index/intro.md
@@ -1,11 +1,12 @@
---
-title: Туториал по YQL. Базовые операции
-description: Из этого туториала вы узнаете, как выполнять базовые операции с данными и познакомитесь с синтаксисом YQL.
+title: YQL tutorial. Basic operations
+description: From this tutorial, you will learn how to perform basic operations with data and get familiar with the YQL syntax.
keywords:
- yql
- - туториал yql
- - базовые операции yql
+ - yql tutorial
+ - yql basic operations
---
+
# Overview
From this tutorial, you will learn how to perform basic operations with data in {{ ydb-short-name }} and get familiar with the YQL syntax.
diff --git a/ydb/docs/en/core/yql/tutorial/_includes/index/steps.md b/ydb/docs/en/core/yql/tutorial/_includes/index/steps.md
index 850bdb1e72..6d5f5dabac 100644
--- a/ydb/docs/en/core/yql/tutorial/_includes/index/steps.md
+++ b/ydb/docs/en/core/yql/tutorial/_includes/index/steps.md
@@ -14,5 +14,4 @@ The tutorial consists of 15 steps:
1. [{#T}](../../update.md)
1. [{#T}](../../delete.md)
1. [{#T}](../../alter_table.md)
-1. [{#T}](../../delete_table.md)
-
+1. [{#T}](../../delete_table.md) \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/tutorial/_includes/yql_tutorial_prerequisites.md b/ydb/docs/en/core/yql/tutorial/_includes/yql_tutorial_prerequisites.md
index d4eda537bc..3848e51da7 100644
--- a/ydb/docs/en/core/yql/tutorial/_includes/yql_tutorial_prerequisites.md
+++ b/ydb/docs/en/core/yql/tutorial/_includes/yql_tutorial_prerequisites.md
@@ -3,4 +3,3 @@
We assume that you already created tables in step [{#T}](../create_demo_tables.md) and populated them with data in step [{#T}](../fill_tables_with_data.md).
{% endnote %}
-
diff --git a/ydb/docs/en/core/yql/tutorial/alter_table.md b/ydb/docs/en/core/yql/tutorial/alter_table.md
index 1dbe81f47b..010eb6657a 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/alter_table.md
+++ b/ydb/docs/en/core/yql/tutorial/alter_table.md
@@ -6,7 +6,7 @@ Add a new column to the table and then delete it.
## Adding a column {#add-column}
-Add a non-key column to the existing table
+Add a non-key column to the existing table:
```sql
ALTER TABLE episodes ADD COLUMN viewers Uint64;
@@ -19,4 +19,3 @@ Delete the column you added from the table:
```sql
ALTER TABLE episodes DROP COLUMN viewers;
```
-
diff --git a/ydb/docs/en/core/yql/tutorial/basic_aggregation.md b/ydb/docs/en/core/yql/tutorial/basic_aggregation.md
index c384f48e55..80bf81e70b 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/basic_aggregation.md
+++ b/ydb/docs/en/core/yql/tutorial/basic_aggregation.md
@@ -8,7 +8,7 @@ Find out the number of unique episodes within every season of every series.
SELECT
series_id,
season_id,
- COUNT(*) AS cnt -- Aggregation function COUNT returns the number of rows
+ COUNT(*) AS cnt -- Aggregation function COUNT returns the number of rows
-- output by the query.
-- Asterisk (*) specifies that COUNT
-- counts the total number of rows in the table.
@@ -19,8 +19,8 @@ SELECT
FROM episodes
GROUP BY
- series_id, -- The query result will follow the listed order of columns
- season_id -- Multiple columns are separated by a comma.
+ series_id, -- The query result will follow the listed order of columns.
+ season_id -- Multiple columns are separated by a comma.
-- Other columns can be listed after a SELECT only if
-- they are passed to an aggregate function.
ORDER BY
@@ -29,5 +29,4 @@ ORDER BY
;
COMMIT;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/tutorial/basic_filter_and_sort.md b/ydb/docs/en/core/yql/tutorial/basic_filter_and_sort.md
index 32fa56db1b..b962e99dc1 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/basic_filter_and_sort.md
+++ b/ydb/docs/en/core/yql/tutorial/basic_filter_and_sort.md
@@ -14,18 +14,17 @@ SELECT
FROM episodes
WHERE
- series_id = 1 -- List of conditions to build the result
- AND season_id > 1 -- Logical AND is used for complex conditions
+ series_id = 1 -- List of conditions to build the result.
+ AND season_id > 1 -- Logical AND is used for complex conditions.
ORDER BY -- Sorting the results.
series_id, -- ORDER BY sorts the values by one or multiple
season_id, -- columns. Columns are separated by commas.
episode_id
-LIMIT 3 -- LIMIT N after ORDER BY means
+LIMIT 3 -- LIMIT N after ORDER BY means
-- "get top N" or "get bottom N" results,
; -- depending on sort order.
COMMIT;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/tutorial/conditional_values.md b/ydb/docs/en/core/yql/tutorial/conditional_values.md
index 9587168313..ff7bfbf4ce 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/conditional_values.md
+++ b/ydb/docs/en/core/yql/tutorial/conditional_values.md
@@ -34,8 +34,8 @@ WHERE series_id IN (1,2) -- IN defines the set of values in the WHERE cla
-- IN or NOT IN may lead to undesirable outcomes.
AND season_id = 1
GROUP BY
- CASE -- CASE evaluates a list of conditions and
- -- returns one of multiple possible resulting
+ CASE -- CASE evaluates a list of conditions
+ -- and returns one of multiple possible resulting
-- expressions. CASE can be used in any
-- statement or with any clause
-- that supports a given statement. For example, you can use CASE in
@@ -52,4 +52,3 @@ GROUP BY
COMMIT;
```
-
diff --git a/ydb/docs/en/core/yql/tutorial/create_demo_tables.md b/ydb/docs/en/core/yql/tutorial/create_demo_tables.md
index 4dcdb33f8e..ffcf6b0b32 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/create_demo_tables.md
+++ b/ydb/docs/en/core/yql/tutorial/create_demo_tables.md
@@ -9,7 +9,7 @@ Keywords are case-insensitive and written in capital letters for clarity only.
{% endnote %}
```sql
- CREATE TABLE series -- series is the table name.
+ CREATE TABLE series -- series is the table name.
( -- Must be unique within the folder.
series_id Uint64,
title Utf8,
@@ -45,4 +45,3 @@ CREATE TABLE episodes
COMMIT;
```
-
diff --git a/ydb/docs/en/core/yql/tutorial/delete.md b/ydb/docs/en/core/yql/tutorial/delete.md
index d9d726a626..d3bc370225 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/delete.md
+++ b/ydb/docs/en/core/yql/tutorial/delete.md
@@ -42,4 +42,3 @@ SELECT * FROM episodes WHERE series_id = 1 AND season_id = 1;
COMMIT;
```
-
diff --git a/ydb/docs/en/core/yql/tutorial/delete_table.md b/ydb/docs/en/core/yql/tutorial/delete_table.md
index 0fa9da6de9..5d008a40bc 100644
--- a/ydb/docs/en/core/yql/tutorial/delete_table.md
+++ b/ydb/docs/en/core/yql/tutorial/delete_table.md
@@ -6,5 +6,4 @@ Delete the [created](create_demo_tables.md) tables using the [DROP TABLE](../ref
DROP TABLE episodes;
DROP TABLE seasons;
DROP TABLE series;
-```
-
+``` \ No newline at end of file
diff --git a/ydb/docs/en/core/yql/tutorial/fill_tables_with_data.md b/ydb/docs/en/core/yql/tutorial/fill_tables_with_data.md
index 2a5d2b4152..83346d766a 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/fill_tables_with_data.md
+++ b/ydb/docs/en/core/yql/tutorial/fill_tables_with_data.md
@@ -7,7 +7,7 @@ REPLACE INTO series (series_id, title, release_date, series_info)
VALUES
- -- By default, numeric literals have type Int32
+ -- By default, numeric literals have type Int32
-- if the value is within the range.
-- Otherwise, they automatically expand to Int64.
(
@@ -116,4 +116,3 @@ VALUES
COMMIT;
```
-
diff --git a/ydb/docs/en/core/yql/tutorial/insert_into.md b/ydb/docs/en/core/yql/tutorial/insert_into.md
index ee4c778227..d7ba507bd9 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/insert_into.md
+++ b/ydb/docs/en/core/yql/tutorial/insert_into.md
@@ -1,6 +1,6 @@
# Inserting data with INSERT
-Add data to the table using [INSERT INTO](../reference/syntax/insert_into.md):
+Add data to the table using [INSERT INTO](../reference/syntax/insert_into.md).
{% include [yql-reference-prerequisites](_includes/yql_tutorial_prerequisites.md) %}
@@ -37,4 +37,3 @@ SELECT * FROM episodes WHERE series_id = 2 AND season_id = 5;
COMMIT;
```
-
diff --git a/ydb/docs/en/core/yql/tutorial/join_tables.md b/ydb/docs/en/core/yql/tutorial/join_tables.md
index 7e5f905d8b..d9d9793465 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/join_tables.md
+++ b/ydb/docs/en/core/yql/tutorial/join_tables.md
@@ -25,4 +25,3 @@ ORDER BY -- Sorting of the results.
COMMIT;
```
-
diff --git a/ydb/docs/en/core/yql/tutorial/replace_into.md b/ydb/docs/en/core/yql/tutorial/replace_into.md
index 2e791d3eb4..c79a16e3ea 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/replace_into.md
+++ b/ydb/docs/en/core/yql/tutorial/replace_into.md
@@ -1,6 +1,6 @@
# Inserting and updating data with REPLACE
-Add data to the table using [REPLACE INTO](../reference/syntax/replace_into.md):
+Add data to the table using [REPLACE INTO](../reference/syntax/replace_into.md).
{% include [yql-reference-prerequisites](_includes/yql_tutorial_prerequisites.md) %}
@@ -32,4 +32,3 @@ SELECT * FROM episodes WHERE series_id = 2 AND season_id = 5;
COMMIT;
```
-
diff --git a/ydb/docs/en/core/yql/tutorial/select_all_columns.md b/ydb/docs/en/core/yql/tutorial/select_all_columns.md
index a0d55bbff6..d3e665e10a 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/select_all_columns.md
+++ b/ydb/docs/en/core/yql/tutorial/select_all_columns.md
@@ -1,6 +1,6 @@
# Selecting data from all columns
-Select all columns from the table using [SELECT](../reference/syntax/select.md):
+Select all columns from the table using [SELECT](../reference/syntax/select.md).
{% include [yql-reference-prerequisites](_includes/yql_tutorial_prerequisites.md) %}
@@ -13,4 +13,3 @@ FROM episodes; -- The table to select the data from.
COMMIT;
```
-
diff --git a/ydb/docs/en/core/yql/tutorial/select_specific_columns.md b/ydb/docs/en/core/yql/tutorial/select_specific_columns.md
index 78c9384116..78c9384116 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/select_specific_columns.md
+++ b/ydb/docs/en/core/yql/tutorial/select_specific_columns.md
diff --git a/ydb/docs/en/core/yql/tutorial/update.md b/ydb/docs/en/core/yql/tutorial/update.md
index 134d9d004e..f33bd6c61f 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/update.md
+++ b/ydb/docs/en/core/yql/tutorial/update.md
@@ -1,6 +1,6 @@
# Updating data with UPDATE
-Update data in the table using the [UPDATE](../reference/syntax/update.md) operator:
+Update data in the table using the [UPDATE](../reference/syntax/update.md) operator.
{% include [yql-reference-prerequisites](_includes/yql_tutorial_prerequisites.md) %}
@@ -45,4 +45,3 @@ SELECT * FROM episodes WHERE series_id = 1 AND season_id = 1;
COMMIT;
```
-
diff --git a/ydb/docs/en/core/yql/tutorial/upsert_into.md b/ydb/docs/en/core/yql/tutorial/upsert_into.md
index 75f2137f48..f9c37407d2 100755..100644
--- a/ydb/docs/en/core/yql/tutorial/upsert_into.md
+++ b/ydb/docs/en/core/yql/tutorial/upsert_into.md
@@ -1,6 +1,6 @@
# Inserting and updating data with UPSERT
-Add data to the table using [UPSERT INTO](../reference/syntax/upsert_into.md):
+Add data to the table using [UPSERT INTO](../reference/syntax/upsert_into.md).
{% include [yql-reference-prerequisites](_includes/yql_tutorial_prerequisites.md) %}
@@ -30,4 +30,3 @@ SELECT * FROM episodes WHERE series_id = 2 AND season_id = 5;
COMMIT;
```
-
diff --git a/ydb/docs/presets.yaml b/ydb/docs/presets.yaml
index ee12268efb..393e4c8c61 100644
--- a/ydb/docs/presets.yaml
+++ b/ydb/docs/presets.yaml
@@ -19,6 +19,11 @@ default:
concept_table: ../../../../concepts/datamodel#table
ydb_local_docker_image: cr.yandex/yc/yandex-docker-local-ydb
ydb_local_docker_image_tag: latest
+ managed-k8s-full-name: Yandex Managed Service for Kubernetes
+ managed-k8s-name: Managed Service for Kubernetes
+ link-console-main: https://console.cloud.yandex.ru
+ s3-storage-host: s3.mds.yandex.net
+ objstorage-name: Object Storage
ydb-cli: ydb
k8s: Kubernetes